MATLAB: Matlab calculates cosine different from the calculator cos If i calculate cos(1) in matlab I get ans=0.5403 whereas my calculator says 0.9998, what am I missing? Best Answer Your calculator is calculating in degrees. By default MATLAB calculates in radians: MATLAB = cos(1)Calculator = cosd(1)produces: MATLAB = 0.540302305868140Calculator = 0.999847695156391Use the MATLAB cosd function (and the other ādā trigonometric functions) to calculate in degrees. Related SolutionsMATLAB: Calculating sin and cos functions Those functions work in radians not degrees, try thiscosd(45)sind(45) MATLAB: Class project: simple calculator >> doc input >> doc fprintf >> doc while >> doc cart2pol >> doc pol2cart >> doc sin >> doc cos >> doc tan >> doc asin >> doc acos >> doc atan Related QuestionHow to solve a non-linear equation system as function handle with fsolve
Best Answer