Create Matrix By Several Matrices These Matrices Have Elements By Equations
1 view (last 30 days)
Show older comments
Create Matrix By Several Matrices These Matrices Have Elements By Equations:
Matrix A = zeros (1728,432), Included Matrices (12,3) puted as Diagonal every element an Equation.
A = [Ax1 Bx1 Cx1 0 0 0 ...; Ay1 By1 Cy1 0 0 0 ....; Ax2 Bx2 Cx2 0 0 0 ...; Ay2 By2 Cy2 0 0 0 ...; ........;Ax12 Bx12 Cx12 0 0 0...; Ay12 By12 Cy12 0 0 0 ...; 0 0 0 Ax1 Bx1 Cx1 0 0 0 ...; 0 0 0 Ay1 By1 Cy1 0 0 0 ... ].
In another word Matrix A = [ Matrix (12*3) Zeros zeros zeros
zeros Matrix (12*3) zeros zeros
zeros zeros Matrix (12*3) zeros ..
... ... ... ... ]
Ax1, Bx1, ..... every element equal equation thier values differes as 288 inputs.
If some one can arrange the loops of matrices and the Main matrix A.
Thanks for any Help
Thanks for any thought
Bashar
5 Comments
Answers (1)
Stephen23
on 20 May 2020
Edited: Stephen23
on 20 May 2020
Having lots of numbered variables is not a good approach, you should place all of those sub-matrices into one cell array when they are created (this is trivial using indexing), i.e.:
C = {M1,M2,... };
where
M1 = [Ax1,Bx1,Cx1;Ay1,By1,Cy1,...];
etc. Of course you should just use indexing when you create them, and NOT use numbered variable names,
B = blkdiag(C{:});
If there is actually just one submatrix repeated (as your question shows), then you can do this:
C = {M};
B = blkdiag(C{ones(1,144)});
0 Comments
See Also
Categories
Find more on Camera Calibration 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!