Assigning count values to the column of a matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Iremsu Savas
le 27 Jan 2019
Réponse apportée : Stephen23
le 27 Jan 2019
Hello,
I have a matrix A with the size 29x3 and I want to fill third column with the numbers from 29(the max lenght) to 1.
Is there a possible way to do it without using loops?
Regards
0 commentaires
Réponse acceptée
Stephen23
le 27 Jan 2019
Either one of these, depending on the order that you want:
A(:,3) = 1:29
A(:,3) = 29:-1:1
0 commentaires
Plus de réponses (0)
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!