app designer says cosd "undefined function"
2 次查看(过去 30 天)
显示 更早的评论
cosd not working in app designer. it works fine in matlab just not in the app designer. app designer says "undefined funtion"
5 个评论
Geoff Hayes
2019-2-1
Isaac - please show us how you are using/calling cosd. It sounds like you are passing in a control rather than a (numeric) angle.
采纳的回答
Geoff Hayes
2019-2-1
Isaac - you are obtaing the angle as
angle = app.Angle;
where presumably Angle is the handle to the matlab.ui.control.NumericEditField and so is not the angle itself. You may need to do someting more like
angle = app.Angle.Value;
to get the value of the angle. (I'm assuming that since this is a NumericEditField, you don't have to convert the above from a string to a number.)
Note that if the above works, you will need to do the same for the initial population and initial velocity.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Install Products 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
