how to use MATLAB units ?
Ältere Kommentare anzeigen
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 ...
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 10 Mär. 2016
0 Stimmen
Other than switching to feval() syntax, No.
5 Kommentare
timo
am 13 Mär. 2016
Walter Roberson
am 13 Mär. 2016
V = sym('unit::volt');
mV = sym('unit::mvolt');
aux1 = feval('symengine', 'unit::convert', 2.1 * V, mV)
timo
am 14 Mär. 2016
Walter Roberson
am 15 Mär. 2016
aux1 = feval(symengine, 'unit::convert', 2.1 * V, mV)
Kategorien
Mehr zu Utilities for the Solver finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!