How to build a vector with dynamic variables?
3 ビュー (過去 30 日間)
古いコメントを表示
I have variables :
q1 = 10;
q2 = 20;
q3 = 3;
q4 = 4;
q5 = 55;
...
qN = x;
and I want to put them in a vector Q that i created like :
Q = zeros(N,1);
How can I insert each variable in the vector at the correspondig place with a loop. Something like that :
for i = 1:N
Q(i)= % here qi
end
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!