How to write a code using if statement which when reads negative volume stops

回答 (1 件)

KSSV
KSSV 2020 年 11 月 6 日
for i = [1 2 3 4 0 5 -6 -7 ]
if i < 0
break
end
i
end

カテゴリ

ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索

タグ

質問済み:

2020 年 11 月 6 日

編集済み:

2020 年 11 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by