⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rad2deg.m

📁 JLAB is a set of Matlab functions I have written or co-written over the past fifteen years for the p
💻 M
字号:
function[varargout]=rad2deg(varargin)%RAD2DEG  Converts radians to degrees.%%   [D1,D2,...DN]=RAD2DEG(R1,R2,...RN) converts the input angles from%   radians to degrees.  Output angles are in the range [-180,180].%%   See also DEG2RAD, DEG180, DEG360. % %   'rad2deg --t' runs a test.%   __________________________________________________________________%   This is part of JLAB --- type 'help jlab' for more information%   (C) 2006 J.M. Lilly --- type 'help jlab_license' for details if strcmp(varargin{1}, '--t')    rad2deg_test,returnend c=2*pi/360;varargout=varargin;for i=1:nargin;    varargout{i}=angle(rot(varargin{i}))./c;endfunction[]=rad2deg_test th= [0 pi/2 pi 3*pi/2 2*pi 5*pi/2];th2=[0 90   180 -90   0    90];reporttest('RAD2DEG simple',aresame(rad2deg(th),th2))th=360*rand(100,1)-180;reporttest('RAD2DEG inverts DEG2RAD',aresame(rad2deg(deg2rad(th)),th,1e-10))

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -