Operate on all the columns of a matrix
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zeynab Mousavikhamene
le 30 Avr 2020
Réponse apportée : Sindar
le 30 Avr 2020
I have a 100*3 matrix and want to normalize each column. Sth like this:
for i=1:3
norm=normalize(mat(:,i))
end
Is there any shorter way to remove "for loop"? This matrix is part of a code that changes its columns in each simulation.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!