Norm of a vector

1 次查看(过去 30 天)
Ayesha
Ayesha 2014-2-12
Hi,
I would like to ask if there is any simple way of calculating norm of vector rather than using built-in function norm?

回答(1 个)

Roger Stafford
Roger Stafford 2014-2-12
For the "L2" norm of a vector v you can use
sqrt(sum(v.^2))
This is only one form of the 'norm' function. See the documentation for others.

类别

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