cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gulah
Visitor
Visitor
3,921 Views
Registered: ‎06-22-2008

How to end a for cicle in MCode block?

I would like to do something like this:

 

for e=1:n
     cont=cont+1;
     if cont >=8

          break;

     else

        blabla

     end

     bliblibli

end

 

But it gives me an error Error("asd.m"): Syntax error: Encountered "break" at line 15, column 9.
What can I do?

Sorry for my english. And thanks for your time. 

0 Kudos
0 Replies