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 CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by