function [CM KG]=STtosi(In,Ib) It is not working
1 次查看(过去 30 天)
显示 更早的评论
i have built a function to convert Ib to kg and in to cm. but it is not working my code function [CM KG]=STtosi(In,Ib) CM=(100*convlength([In],'in','m')) KG=convmass([Ib],'lbm','kg') end
0 个评论
采纳的回答
Birdman
2018-6-9
编辑:Birdman
2018-6-9
Since you did not mention why the function is not working, it may have two reasons:
- Firstly, you need to save your function with its function name in your current directory and then call from command line like
[CM,KG]=STtosi(1,2) %inputs are random
and the above one worked for me.
-To be able to use convmass and convlength, you need to have Aerospace Toolbox license. If you do not have, please check it.
Hope this helps.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Unit Conversions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!