ide - How to convert MATLAB code segment to single line? -
i'm looking way convert multi-line code such :
for i=1:10 foo(); end
to :
for i=1:10, foo(); end
is there easy way in matlab editor? preferrably reversable?
i think accidentally hit keyboard shortcut few days ago, , saw magic happen, couldn't find keys did press :)
thanks !
p.s. i'm not sure if question belongs superuser, believe can find quick answer here, , relevant programming, win-win !
it work if write way:
for i=1:10, foo();, end
(note comma after foo();)
but did hit + or - before for, expand of collapse "for" code sequence.
if go in "view" tab, there buttons expand of collapse can use same.