Hi,,is there anyone who could tell me how do I use a loop control statement in matlab? or how do I use iterative loops in matlab?
조회 수: 1 (최근 30일)
이전 댓글 표시
how do I execute and control a statement for several time? In C++,flag=true/false,could be used.How do I do that in Matlab?
댓글 수: 0
채택된 답변
Geoff Hayes
2016년 6월 10일
nafila - see loop control statements for some examples on how to use for or while loops. Using your C++ example, you could do something like
flag = true;
while flag
% do some work
if someConditionMet
flag = false;
end
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!