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

4 visualizaciones (últimos 30 días)
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?

Respuestas (1)

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

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by