📄 hms2sec.m
字号:
function x=hms2sec(h,m,s)
%HMS2SEC Convert hms format into seconds.
% SEC = HMS2SEC(H,M,S) converts value H in unit hours,
% value M in unit minutes and S in unit seconds into
% SEC in unit seconds.
%
% SEC = HMS2SEC(HMS) converts vector HMS
% corresponding to the values [H M S] above into
% SEC in unit seconds.
%
% See also SEC2HMS, DEG2DMS, DMS2DEG, NUM2MASS.
% Copyright (c) 2002-03-04, B. Rasmus Anthin.
if nargin==2,error('Must be 1 or 3 arguments.'),end
hms=h;
if nargin==3,hms=[h m s];end
x=hms*60.^(2:-1:0)';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -