Help with while loop

1 Ansicht (letzte 30 Tage)
Hdez
Hdez am 26 Nov. 2020
Kommentiert: Hdez am 3 Dez. 2020
I can't do this while loop properly, someone help me please?
  2 Kommentare
Rik
Rik am 26 Nov. 2020
Why did you delete your previous question? It is the same as this one.
Hdez
Hdez am 3 Dez. 2020
Thank you for your help

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 26 Nov. 2020
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

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by