How can I multiply matrix with multiple vectors without loop?

조회 수: 2 (최근 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.

채택된 답변

David Goodmanson
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개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by