How can I multiply matrix with multiple vectors without loop?
5 次查看(过去 30 天)
显示 更早的评论
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

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!