for loops within while loop

Respuestas (1)

VBBV
VBBV el 15 de Abr. de 2024

0 votos

while t1< 2 & h2 >= 0
 % your code 
end 

You could put both conditions together as above using single while loop.

3 comentarios

VBBV
VBBV el 15 de Abr. de 2024
Initialize h2 as zero before the start of while loop since it does not exist.
Matthew
Matthew el 15 de Abr. de 2024
unfortunately this does not solve the questions two my problem. i appreciate the insight, though.
VBBV
VBBV el 16 de Abr. de 2024
if you explain the problem clearly (without dubious intentions) , its easier to get the problem solved.

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Abr. de 2024

Comentada:

el 16 de Abr. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by