필터 지우기
필터 지우기

return to previous step

조회 수: 2 (최근 30일)
arwa
arwa 2016년 12월 21일
답변: James Tursa 2016년 12월 21일
hello, I have a program code including some steps like step A,B,C and D I want at step D if condition is true go back or return to step B and so on. How can I translate it? Can I use while loop?

채택된 답변

James Tursa
James Tursa 2016년 12월 21일
Do you mean something like this?
% Step A
while( true )
% Step B
% Step C
% Step D
if( condition )
continue % <-- return to Step B
end
% Step E
break % <-- go to Step F
end
% Step F
Without more details about your code, it is hard to know what logic you really need.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by