repeat a matrix as digonal element in a new matrix?
Afficher commentaires plus anciens
Hi
I have a 2D matrix, and I want repeat it a digonal element in a new matrix., somthing like this:
A is 2*3 matrix , and we want reapeat for 10 time like:
B= [ A 0 0 .....0; 0 A 0 .....0; .............. ;0 0 0 ........A]
hence B is a 20*30 matrix. How can make B without using "for"?
Réponse acceptée
Plus de réponses (1)
Catégories
En savoir plus sur Operating on Diagonal Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!