Effacer les filtres
Effacer les filtres

How to use array as loop?

1 vue (au cours des 30 derniers jours)
NoYeah
NoYeah le 23 Avr 2020
Modifié(e) : KSSV le 23 Avr 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?

Réponse acceptée

KSSV
KSSV le 23 Avr 2020
Modifié(e) : KSSV le 23 Avr 2020
y = 0:0.01:1 ;
for i = y
i
end
for i = 1:length(y)
y(i)
end

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by