Magnitude of a vector with unit
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am having a trouble getting the numerical value of the magnitude of a vector with a unit.
clearvars;
u=symunit;
x=[1 2 3]*(u.m);
norm(x)
x=[1 2 3];
norm(x)
x=[1 2 3]*(u.m);
y=[5 6 7]*(u.m);
z=norm(x)/norm(y)
vpa(z)
As it can be seen above, Matlab does not give me the numerical value of the magnitude when units are present.
0 commentaires
Réponse acceptée
Paul
le 12 Mar 2023
u=symunit;
x=[1 2 3]*(u.m);
norm(x)
simplify(norm(x))
vpa(ans)
x=[1 2 3]*(u.m);
y=[5 6 7]*(u.m);
z=simplify(norm(x)/norm(y))
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Digital Filter Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!