small matrix in big matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to put a small matrix (p*q) called B into a bigger matrix (m*n) called A. How can I do it. Matrix B should be put on the left-right corner of matrix A.
3 commentaires
Walter Roberson
le 2 Juin 2013
the cyclist
le 2 Juin 2013
Modifié(e) : the cyclist
le 2 Juin 2013
Walter's comment here http://www.mathworks.com/matlabcentral/answers/77746-small-matrix-in-big-matrix duplicates Image Analyst's comment here: http://www.mathworks.com/matlabcentral/answers/77746-small-matrix-in-big-matrix.
[Sorry. Couldn't resist teasing the master!]
Réponse acceptée
the cyclist
le 2 Juin 2013
I don't know what "left-right corner" means, but in general you can do this as:
A = magic(7);
B = magic(3);
A(2:4,3:5) = B;
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!