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

4 views (last 30 days)
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?

Answers (1)

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

Tags

Community Treasure Hunt

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

Start Hunting!