Files
matlab-learning/lab2/rad2deg.m
2025-11-17 11:16:02 +08:00

7 lines
146 B
Matlab

function jdeg=rad2deg(rad)
rad=rad*180/pi;
deg=fix(rad);
xsbf=(rad-deg)*60;
degf=fix(xsbf);
degm=(xsbf-degf)*60;
jdeg=deg+degf/100.0+degm/10000.0;