Vectorise a matrix multiplication chain

조회 수: 1 (최근 30일)
Divij Gupta
Divij Gupta 2021년 6월 22일
답변: KSSV 2021년 6월 22일
I want to find a non-loop way to do the following:
for c = 1:q
h = h*Z{c};
end
Basically, how can I vectorise Z{1}*Z{2}*...*Z{q}?

답변 (1개)

KSSV
KSSV 2021년 6월 22일
Read about the function prod.

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by