How can I multiply matrix with multiple vectors without loop?
2 ビュー (過去 30 日間)
古いコメントを表示
K M Ibrahim Khalilullah
2017 年 7 月 1 日
編集済み: David Goodmanson
2017 年 7 月 1 日
I have a matrix R of size 3by3 and vector matrix T (multiple vectors) as illustrated in Figure. How can I get the output as I shown in the figure. I don't
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165686/image.png)
want to use the loop.
0 件のコメント
採用された回答
David Goodmanson
2017 年 7 月 1 日
編集済み: David Goodmanson
2017 年 7 月 1 日
Hello K M, You do this exactly as you have written it.
T = [T1 T2 T3 .... Tn]; % concatenate as many 3x1 column vectors as you would like.
Output = R*T; % 3xn matrix
Then the column vector R*Tj is Output(:,j), the jth column of Output.
0 件のコメント
その他の回答 (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!