Function computation in Matlab
1 次查看(过去 30 天)
显示 更早的评论
Hei!
I am trying to compute the following function
function [x,y] = f(z) x=cos(z)*2; y=sin(z)*2; end
The answer I get in the end (z=50) is x=-1.904825 and y=-0.60962. But this answer is not correct.
Can somebody tell me where I did mistake?
0 个评论
采纳的回答
the cyclist
2015-5-13
cos and sin are assuming input in radians. Is that what z is in? If it is in degrees, use cosd and sind instead.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Chebyshev 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!