for loops within while loop

回答(1 个)

VBBV
VBBV 2024-4-15

0 个投票

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

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

3 个评论

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

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

提问:

2024-4-15

评论:

2024-4-16

Community Treasure Hunt

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

Start Hunting!

Translated by