How to use array as loop?

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 个)

类别

在 帮助中心 和 File 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