Help with while loop

1 visualización (últimos 30 días)
Hdez
Hdez el 26 de Nov. de 2020
Comentada: Hdez el 3 de Dic. de 2020
I can't do this while loop properly, someone help me please?
  2 comentarios
Rik
Rik el 26 de Nov. de 2020
Why did you delete your previous question? It is the same as this one.
Hdez
Hdez el 3 de Dic. de 2020
Thank you for your help

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 26 de Nov. de 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

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by