Operate on all the columns of a matrix
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Zeynab Mousavikhamene
am 30 Apr. 2020
Beantwortet: Sindar
am 30 Apr. 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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!