Filter löschen
Filter löschen

How to use array as loop?

3 Ansichten (letzte 30 Tage)
NoYeah
NoYeah am 23 Apr. 2020
Bearbeitet: KSSV am 23 Apr. 2020
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?

Akzeptierte Antwort

KSSV
KSSV am 23 Apr. 2020
Bearbeitet: KSSV am 23 Apr. 2020
y = 0:0.01:1 ;
for i = y
i
end
for i = 1:length(y)
y(i)
end

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by