MATLAB: Goto command in matlab

goto

i have code consist from 80 step, at step 60 i have condition, if not true, it should be jump to step 30, my question, is there (goto) or somthing same command in matlab

Best Answer

There's no goto in matlab, and there is no need to. You could just as well code your algorithm as:
%... step 1 to 29
condition = false;
while ~condition
%... step 30 to 60
condition = sometest
end
%... step 61 to 80