For Loop Help with Output

1 visualizzazione (ultimi 30 giorni)
Justin Manterrnacch
Justin Manterrnacch il 25 Gen 2022
Risposto: David Hill il 25 Gen 2022
Unsure how to make Y, over range x, output in matrix not a singular answer.
h=.1;
y=1;
for x=0:h:10
Y=y+h.*x;
end

Risposte (1)

David Hill
David Hill il 25 Gen 2022
No for-loop needed.
h=.1;
y=1;
x=0:h:10;
Y=y+h*x;

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by