Matrix 10x10 with same number in each row by column.
Afficher commentaires plus anciens
As title says I'm looking for a way to generate a matrix 10x10 where each row has same number as a number of a column. Like if we are on column 1 all rows are filled with 1's or for column 5 all rows are filled with 5's. I was trying to use function 'zeros()' to generate them and in 'for' loop gradually increase them. I hope to find more refined method to do this task.
Réponse acceptée
Plus de réponses (1)
M=repelem(1:10,10,1)
M = ceil( reshape(1:100,10,10) /10 )
M = fft(1:10,10,1)
Catégories
En savoir plus sur Matrices and Arrays 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!