Do-While

2 views (last 30 days)
Salvatore Turino
Salvatore Turino on 21 Jan 2012
Hallo, i want to realize in matlab the C code do-while. the condition to stop the cicle is: if save_rig==A(n). can you tell me how to realize it in matlab?actually i've done it with a for cicle+break but i don't like this solution. thank you

Accepted Answer

Walter Roberson
Walter Roberson on 21 Jan 2012
while true
%code here
if save_rig == A(n); break; end
end

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!