how to use MATLAB units ?
Mostra commenti meno recenti
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 ...
Risposta accettata
Più risposte (2)
Walter Roberson
il 10 Mar 2016
0 voti
Other than switching to feval() syntax, No.
5 Commenti
timo
il 13 Mar 2016
Walter Roberson
il 13 Mar 2016
V = sym('unit::volt');
mV = sym('unit::mvolt');
aux1 = feval('symengine', 'unit::convert', 2.1 * V, mV)
timo
il 14 Mar 2016
Walter Roberson
il 15 Mar 2016
aux1 = feval(symengine, 'unit::convert', 2.1 * V, mV)
Categorie
Scopri di più su Utilities for the Solver in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!