Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to return a external sentences for a loop ?

1 回表示 (過去 30 日間)
fernando ramos
fernando ramos 2015 年 12 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi, I try to realize a program for this flowchart but, I had problem with the part that I marked in red. The problem is in the part that it defined for second time "sigma less or equal 0" I don't know how to create the code for this part.
In mi code, when It defined in first time "sigma less or equal 0", I use the sentences 'if' and break if the sentences is fulfilled then,I use "else" and "while" (in the part I defined sigma more or equal 0") for the next part. I appreciate your answer!

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 12 月 8 日
while true
do a calculation
if conditions are good
break
end
do another calculation
if conditions are good
break
end
end
do the final calculations

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by