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 Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by