how to use MATLAB units ?
이전 댓글 표시
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 ...
채택된 답변
추가 답변 (2개)
Walter Roberson
2016년 3월 10일
0 개 추천
Other than switching to feval() syntax, No.
댓글 수: 5
timo
2016년 3월 13일
Walter Roberson
2016년 3월 13일
V = sym('unit::volt');
mV = sym('unit::mvolt');
aux1 = feval('symengine', 'unit::convert', 2.1 * V, mV)
timo
2016년 3월 14일
Walter Roberson
2016년 3월 15일
aux1 = feval(symengine, 'unit::convert', 2.1 * V, mV)
카테고리
도움말 센터 및 File Exchange에서 Utilities for the Solver에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!