MATLAB: How to undo indenting after terminating a loop in the MATLAB file in MATLAB 7.6 (R2008a)

aligncodectrl+iindentleft-alignedMATLABmove

I have written a long for loop in my MATLAB file script. Now I want to terminate the enclosing loop (delete FOR and END statements) and undo the indenting of the enclosed code (align the code to the left).
I would like to do this without manually deleting the white space at the beginning of every line.

Best Answer

You can manually apply smart indenting to selected lines select the lines and then select Smart Indent from the Text menu, or right-click and select it from the context menu (CTRL+I).
For further details about manual and automatic indenting please refer to the 'Indenting' section in the MATLAB documentation or run the following command in MATLAB 7.6 (R2008a):
web([docroot '/techdoc/matlab_env/f2-58922.html'])