马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
function disp_hhs(varargin)
error(nargchk(1,3,nargin));
fs = 0; 此处的fs为什么等于0?
inf = -20; im = varargin{1};
t = 1:size(im,2);switch nargin
case 1
%raf 这是什么意思?
case 2
if isscalar(varargin{2})
inf = varargin{2};
else
t = varargin{2};
end
case 3
if isvector(varargin{2})
t = varargin{2};
inf = varargin{3};
else
inf = varargin{2};
fs = varargin{3};
end
case 4
t = varargin{2};
inf = varargin{3};
fs = varargin{4};
end if isempty(inf)
%确定数组是否为空,若为空返回逻辑1,
inf = -20;
end if inf > 0
inf = -inf;
elseif inf == 0
error('inf must be nonzero')
end M=max(max(im)); warning off im = 10*log10(im/M); warning on figure if fs == 0 为什么等于0?
imagesc(t,[0,0.5],im,[inf,0]);
ylabel('normalized frequency')
else
imagesc(t,[0,0.5*fs],im,[inf,0]);
ylabel('frequency')
end set(gca,'YDir','normal') xlabel('time') title('Hilbert-Huang spectrum') |