Different kind of normalization
古いコメントを表示
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.
採用された回答
その他の回答 (2 件)
Matt Tearle
2011 年 3 月 15 日
0 投票
If you have Statistics Toolbox, use uhat = zscore(u).
Steven Lord
2020 年 5 月 11 日
0 投票
Use the normalize function.
カテゴリ
ヘルプ センター および File Exchange で Numerical Integration and Differentiation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!