Help with while loop

I can't do this while loop properly, someone help me please?

2 件のコメント

Rik
Rik 2020 年 11 月 26 日
Why did you delete your previous question? It is the same as this one.
Hdez
Hdez 2020 年 12 月 3 日
Thank you for your help

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 11 月 26 日

1 投票

dt = input('Enter the desired time step: ');
while dt >= h^2 / (4*alpha)
fprintf('solution is unstable\nPlease enter a value smaller than %g\n', h^2/(4*alpha));
dt = input('Enter the desired time step: ');
end

カテゴリ

ヘルプ センター および File ExchangeLoops and Conditional Statements についてさらに検索

質問済み:

2020 年 11 月 26 日

コメント済み:

2020 年 12 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by