Vectorise a matrix multiplication chain

1 Ansicht (letzte 30 Tage)
Divij Gupta
Divij Gupta am 22 Jun. 2021
Beantwortet: KSSV am 22 Jun. 2021
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}?

Antworten (1)

KSSV
KSSV am 22 Jun. 2021
Read about the function prod.

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by