行ベクトルの要素の一括代入
Show older comments
以下を実行するとエラーになります。
B= [1;2];
[XX; YY] = B;
下の様にそれぞれの要素毎に代入すればできることは理解しています。
XX = B(1);
YY=B(2);
正確にはBという変数を作らず、行ベクトルとなっている演算結果の要素を違う変数に入れたいと
考えています。
例えば以下の様なイメージのことを実現したいです。
[XX; YY] = A*[1;2;1];
一旦配列に格納せず、同じ演算を繰り返さない良い方法をご教示いただけないでしょうか?
Accepted Answer
More Answers (0)
Categories
Find more on Lengths and Angles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!