Hello, can anyone help me ? I did some operations with scalar matrix: Example:
A= [1 2 3 4 5];
C= [0.5 0.25 0 0 0.25; 0.25 0.5 0.25 0 0; 0 0.25 0.5 0.25 0; 0 0 0.25 0.5 0.25; 0.25 0 0 0.25 0.5];
A*C=[ 2.25 2 3 4 3.75];
Now my task is to change A elements into 2x2 matrices and then to do the same operation, for example, C is the same matrix:
AA= [ [1.75 4;-0.25 -0.25] [1.55 4;-0.25 -0.45] [1.75 4;-0.25 -0.25 ] [1.65 4;-0.25 -0.35] [1.15 4;-0.25 -0.85]];
I want to multiply each variable in a cell array (which is a 2x2 matrix) coefficients in C, if to make clear, the multiplication should be performed like this;
AA*C = [ [1.75 4;-0.25 -0.25]*0.5+ [1.55 4;-0.25 -0.45] *0.25+0+0+[1.15 4;-0.25 -0.85]*0.25
[1.75 4;-0.25 -0.25]*0.25 +[1.55 4;-0.25 -0.45]*0.5+ [1.75 4;-0.25 -0.25 ]*0.25+0+0
0+[1.55 4;-0.25 -0.45] *0.25+[1.75 4;-0.25 -0.25 ]*0.5+[1.65 4;-0.25 -0.35]*0.25+0
0+0+[1.75 4;-0.25 -0.25 ]*0.25+[1.65 4;-0.25 -0.35]*0.5+[1.15 4;-0.25 -0.85]*0.25
[1.75 4;-0.25 -0.25] *0.25 +0+0+[1.65 4;-0.25 -0.35]*0.5+[1.15 4;-0.25 -0.85]*0.25 ];
How can I get this – to preserve usual matrix operation? Thank You.
2 Comments
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/387525-multiplication-of-array-of-matrices-with-array-of-scalars#comment_544027
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/387525-multiplication-of-array-of-matrices-with-array-of-scalars#comment_544027
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/387525-multiplication-of-array-of-matrices-with-array-of-scalars#comment_544553
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/387525-multiplication-of-array-of-matrices-with-array-of-scalars#comment_544553
Sign in to comment.