Help with while loop

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

2 个评论

Why did you delete your previous question? It is the same as this one.
Thank you for your help

请先登录,再进行评论。

回答(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 Exchange 中查找有关 Loops 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