function results into a vector
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have this code which I want to have output a vector which I can then plot versus the input but the answer Vreg comes out as a single number. How can I get the function to output a vector evaluated at each value of the input vector?
VL = 0:.1:500;
Vreg = [(230-(VL))/(VL)];
plot(VL,Vreg)
0 Kommentare
Antworten (2)
the cyclist
am 21 Sep. 2019
Bearbeitet: the cyclist
am 21 Sep. 2019
You need element-wise division. Try
Vreg = [(230-(VL))./(VL)];
0 Kommentare
Siehe auch
Kategorien
Mehr zu Creating and Concatenating Matrices 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!