how to use MATLAB units ?
Afficher commentaires plus anciens
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 ...
Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 10 Mar 2016
0 votes
Other than switching to feval() syntax, No.
5 commentaires
timo
le 13 Mar 2016
Walter Roberson
le 13 Mar 2016
V = sym('unit::volt');
mV = sym('unit::mvolt');
aux1 = feval('symengine', 'unit::convert', 2.1 * V, mV)
timo
le 14 Mar 2016
Walter Roberson
le 15 Mar 2016
aux1 = feval(symengine, 'unit::convert', 2.1 * V, mV)
Catégories
En savoir plus sur Utilities for the Solver dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!