Different kind of normalization
Ältere Kommentare anzeigen
I have read in Matlab that normalization of a vector is u/norm(u).
However, I have a matrix (N x N)where the columns are different vectors. I want for each element of column vectors to do something like: (u(i) - mean(u))/std(u) without looping so that at the end of it each column vectors are bunch of standard normals.
Is there a standard way to do it in matlab or do I really have to code the loop.
Akzeptierte Antwort
Weitere Antworten (2)
Matt Tearle
am 15 Mär. 2011
0 Stimmen
If you have Statistics Toolbox, use uhat = zscore(u).
Steven Lord
am 11 Mai 2020
0 Stimmen
Use the normalize function.
Kategorien
Mehr zu Numerical Integration and Differentiation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!