Is there a MATLAB function that calculates the magnitude of a velocity vector?

5 vues (au cours des 30 derniers jours)
v(t) = sqrt( x(t)^2 + y(t)^2 + z(t)^2 )

Réponse acceptée

Walter Roberson
Walter Roberson le 6 Mar 2022
if x y z are scalar then
norm([x, y, z])
  3 commentaires
Steven Lord
Steven Lord le 6 Mar 2022
If you have multiple vectors whose norm you want to calculate stored in a matrix and you're using release R2017b or later, use the vecnorm function.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits


Version

R2012b

Community Treasure Hunt

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

Start Hunting!

Translated by