How to use array as loop?

3 ビュー (過去 30 日間)
NoYeah
NoYeah 2020 年 4 月 23 日
編集済み: KSSV 2020 年 4 月 23 日
I want to use array as loop
y=0:0.01:1
for x in range y
print(x)
end
but it occurs error
how to use y array as iteration?

採用された回答

KSSV
KSSV 2020 年 4 月 23 日
編集済み: KSSV 2020 年 4 月 23 日
y = 0:0.01:1 ;
for i = y
i
end
for i = 1:length(y)
y(i)
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by