Syntax to multiply 10 different 2 by 2 matrices sequentially in matlab
Show older comments
Please I need help with syntax to multiply ten 2 by 2 matrices i.e T = A1*A2*A3*A4*A5*A6*A7*A8*A9*A10 in matlab
2 Comments
Image Analyst
on 14 Sep 2013
"Matrix" multiplication, or "element-by-element" multiplication?
Segun Emmy
on 14 Sep 2013
Accepted Answer
More Answers (1)
Image Analyst
on 15 Sep 2013
For element by element multiplication, I believe this should work:
T = A1.*A2.*A3.*A4.*A5.*A6.*A7.*A8.*A9.*A10
If the A's are of class integer, you'll have to watch out if they exceed the max value, intmax('uint8') or intmax('uint16'), or else your product will be clipped. Cast to double before multiplication if that's the case.
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!