MATLAB: App designer says cosd “undefined function”

app designercosd

cosd not working in app designer. it works fine in matlab just not in the app designer. app designer says "undefined funtion"

Best Answer

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.