필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

is there a way to implement a for loop in which matrix multiplication is exist?

조회 수: 1 (최근 30일)
saeid k
saeid k 2017년 7월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
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?

답변 (1개)

Andrei Bobrov
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,[]);

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by