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

4 Ansichten (letzte 30 Tage)
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?

Antworten (1)

Kevin Phung
Kevin Phung am 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!

Translated by