How to programming the matrix of mn ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I would like to know how to coding the matrix with the following pattern?
Could I use the "for" or ''while" loop or is there any other way to deal with it?
mn=[1 1; 1 3; 1 5; 1 7; 3 1; 3 3; 3 5; 3 7; 5 1; 5 3; 5 5; 5 7; 7 1; 7 3; 7 5; 7 7...........]
Thank you very much!
0 commentaires
Réponse acceptée
Plus de réponses (1)
Jonas
le 18 Mai 2021
you could e.g. use the kronecker product like
[kron((1:2:18)',ones(4,1)) kron(ones(numel(1:2:18),1),(1:2:7)')]
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices 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!