# Experts need your suggestions here
for i=1:10
c(i)=...
while isnan(c(i)) || c(i)>0.009
c(i)=..
end
end
I know multiple loop is messed here, just try to get way out. Hope I undestand the question.
One Note: Without changing i, is there any possibilty to change the C(i) in next or next iterartions within while loop, so that once it fail, it exit from while loop?
The code runs within the while loop, without changing i ultill C(i) satisfy any one conditions-
- C(i) is NaN
- C(i)>0.009
2 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/471730-change-the-iteration-in-for-loop#comment_724526
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/471730-change-the-iteration-in-for-loop#comment_724526
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/471730-change-the-iteration-in-for-loop#comment_724527
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/471730-change-the-iteration-in-for-loop#comment_724527
Sign in to comment.