Filter löschen
Filter löschen

How to create a vector based on another vector in a for loop?

1 Ansicht (letzte 30 Tage)
Felicia Adamsson
Felicia Adamsson am 12 Apr. 2022
Kommentiert: David Hill am 12 Apr. 2022
I would like to create a vector based on another vector, how do i do that? Is it easiest to do so with a for loop? Below is the code that i have so far. But it doesn't seem to be working. What am I missing?
for Vp=[0:0.2:4];
u=Vp/A
end

Antworten (1)

David Hill
David Hill am 12 Apr. 2022
Vp=0:.2:4;
A=5;
u=Vp/A;

Kategorien

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

Community Treasure Hunt

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

Start Hunting!

Translated by