How to use array as loop?

조회 수: 1 (최근 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