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 件のコメント

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

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeLoops 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