Hi, I need a function that calculates the sine of the corresponding element of deg. Deg are giving in degrees and I am not allowed to use sind. My code is as follows:
function [value,average]=sindeg(deg) value=deg*pi/180; average=sum(value)/numel(deg) end
I know the result of value should be 0 1 0 for deg = [0 90 180].
Mine function is clearly wrong. Can you help. Thanks
Best Answer