Matrix manipulation problem under MATLAB
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
dakhli mohamed
el 21 de Nov. de 2018
Respondida: Guillaume
el 21 de Nov. de 2018
I want to put a matrix A in another matrix B
example
A= 0 2 9
5 7 3
4 6 1
B= 0 2 9 0 0 0
5 7 3 0 0 0
4 6 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
and a C matrix in another place
C= 1 2 3
4 5 6
7 8 9
B= 0 2 9 0 0 0
5 7 3 0 0 0
4 6 1 0 0 0
0 0 0 1 2 3
0 0 0 4 5 6
0 0 0 7 8 9
0 comentarios
Respuesta aceptada
Más respuestas (1)
Guillaume
el 21 de Nov. de 2018
A = [0 2 9; 5 7 3; 4 6 1];
C = [1 2 3; 4 5 6; 7 8 9];
B = blkdiag(A, C)
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!