How does normr work?

5 次查看(过去 30 天)
Yes i realize it returns a matrix with the values having a norm of 1 but how exactly does it do this? My knowledge of statistics is sorely lacking.
Thanks!

采纳的回答

Jos (10584)
Jos (10584) 2014-1-28
You can open the m-file (type norm.m) and find something like this:
[mr,mc]=size(m);
if (mc == 1)
n = m ./ abs(m);
else
n=sqrt(ones./(sum((m.*m)')))'*ones(1,mc).*m;
end
That's all ...

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by