how to use MATLAB units ?
Mostrar comentarios más antiguos
I need to use units in Matlab
To use Matlab units i use Mupad like this:
aux1 = evalin(symengine,'unit::convert(2.1*unit::volt, unit::mvolt)')
Which returns
2100.0*unit::mvolt
Is there any way to use units beside this hack , which is quite annoying ...
Respuesta aceptada
Más respuestas (2)
Walter Roberson
el 10 de Mzo. de 2016
0 votos
Other than switching to feval() syntax, No.
5 comentarios
timo
el 13 de Mzo. de 2016
Walter Roberson
el 13 de Mzo. de 2016
V = sym('unit::volt');
mV = sym('unit::mvolt');
aux1 = feval('symengine', 'unit::convert', 2.1 * V, mV)
timo
el 14 de Mzo. de 2016
Walter Roberson
el 15 de Mzo. de 2016
aux1 = feval(symengine, 'unit::convert', 2.1 * V, mV)
Categorías
Más información sobre Utilities for the Solver en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!