x =
Should Unity Value be Displayed when Multiplied by a symunit?
Mostrar comentarios más antiguos
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 comentarios
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.
Respuestas (0)
Categorías
Más información sobre App Building en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

