function results into a vector
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
the cyclist
2019 年 9 月 21 日
編集済み: the cyclist
2019 年 9 月 21 日
You need element-wise division. Try
Vreg = [(230-(VL))./(VL)];
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!