Hi All

I want to ask question in matlab, Can I create if loop inside for loop such that if on condition of if hold then for loop must end, i.e How can we do the following

For i = 1:2:10

if mod(i,2)=0

end

else

i

end

Best wishes

Printable View

- January 4th 2011, 02:02 AMraedQuestion in matlab
Hi All

I want to ask question in matlab, Can I create if loop inside for loop such that if on condition of if hold then for loop must end, i.e How can we do the following

For i = 1:2:10

if mod(i,2)=0

end

else

i

end

Best wishes - January 4th 2011, 02:33 AMalexmahone
- January 4th 2011, 02:53 AMCaptainBlack
This has already been aswered in your last thread:

>>help break

CB