How do I convert this for loop in to while loop with same sequence of number.

1 回表示 (過去 30 日間)
Abdul Manan
Abdul Manan 2020 年 6 月 23 日
回答済み: Mohammad Sami 2020 年 6 月 23 日
for x=0:2:50
disp(x);
end

回答 (1 件)

Mohammad Sami
Mohammad Sami 2020 年 6 月 23 日
x = 0;
while x <= 50
disp(x);
x = x + 2;
end

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by