Help with while loop

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

2 commentaires

Rik
Rik le 26 Nov 2020
Why did you delete your previous question? It is the same as this one.
Hdez
Hdez le 3 Déc 2020
Thank you for your help

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 26 Nov 2020

1 vote

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

Catégories

En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange

Question posée :

le 26 Nov 2020

Commenté :

le 3 Déc 2020

Community Treasure Hunt

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

Start Hunting!

Translated by