To execute the given code clc; clear; s = 'program '; s(1:3:end) = s(end:-3:1); disp(s)
in MATLAB, you can simply write it in a script or the command window.
Here is the code:
main.m63 chars6 lines
When you run this code, it will output the modified string gpomar
.
gistlibby LogSnag