Is there any function for calculating the size of a position vector in matlab?

4 次查看(过去 30 天)
I have a vetor like (x,y,z) which is showing a point in the space. The size of this vector is sqrt(x^2+y^2+z^2). Is there any function for this in matlab?

回答(1 个)

Kevin Phung
Kevin Phung 2019-2-27
use the norm() function.
example:
norm([1 2 3])
ans =
3.7417

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by