I searched for a way to do a sequential matrix multiplication similarly to the sum(A,dim) or prod(A,dim) operations do for the sum or the element-wise multiplication.
for example:
A = arrayfun(@(x) rand(5), 1:n, 'UniformOutput', false);
P = A{1} * A{2} * ... * A{n}; % <-- search for an elegant way to do this
I would use it to multiply a large number of Transfer matrices.
Use a for loop for this. It is what an 'elegant' method would do eventually.
P = A{1};
for i=2:length(A), P = P * A{i}, end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With