x =
Should Unity Value be Displayed when Multiplied by a symunit?
Afficher commentaires plus anciens
The following results look peculiar IMO. Shouldn't a unit always be preceded by a value? I've never seen this convention before.
u = symunit;
mps = u.meter/u.sec;
x = 1*mps
x = reshape(1:4,2,2)*mps
4 commentaires
Furthermore,
u = symunit;
C = u.Celsius;
F = u.Fahrenheit;
K = u.K;
x = [0*C, 0*F, 0*K]
"Shouldn't a unit always be preceded by a value?"
Yes. If I measure one volt then I would write "1 V". Lets try:
u = symunit;
x = 1 * u.V
y = 0.5 * u.V
z = 2*y % !!!
The documentation does state "1 represents a dimensionless unit. Hence, isUnit(sym(1)) returns logical 1 (true)", but it is unclear to me if that has any bearing on the observed behavior.
Réponses (0)
Catégories
En savoir plus sur App Building dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

