How can I extend a Matrix as putting a new matrix into each element of main matrix?
1 view (last 30 days)
Show older comments
I have a 3x3 main matrix (A) and I have also a 2x2 matrix (B). I want to put matrix B into each element of matrix A. I mean end of the algorithm I have a 6x6 matrix (new A).
The algoritm like "if there is a connection between line 1 and line 2, put matrix B*constant to new A(1,2)". How can I do that?
A=[0 0 0;0 0 0;0 0 0]; B=[1 1;1 1]; new A=[1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1]
0 Comments
Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices 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!