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

- Jan 4th 2011, 03: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 - Jan 4th 2011, 03:33 AMalexmahone
- Jan 4th 2011, 03:53 AMCaptainBlack
This has already been aswered in your last thread:

>>help break

CB