Info
この質問は閉じられています。 編集または回答するには再度開いてください。
is there a way to implement a for loop in which matrix multiplication is exist?
1 回表示 (過去 30 日間)
古いコメントを表示
I want to implement a For loop using the Simulink, in which some matrix multiplications exist. The related code is as follows: for i=1:r Y(i,t)=W(:,i,t-1)'*x(:,i,t); can anyany body help me?
0 件のコメント
回答 (1 件)
Andrei Bobrov
2017 年 7 月 23 日
ii = 1:r;
t = 2:n;
k = r*(n-1);
Y = reshape(reshape(W(:,ii,t),[],k)'*reshape(x(:,ii,t-1),[],k),r,[]);
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!