marry0539 发表于 2011-4-15 16:22

关于disp_hhs的几个疑问

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;endif inf > 0
inf = -inf;elseif inf == 0
error('inf must be nonzero')endM=max(max(im)); warning offim = 10*log10(im/M);warning on figure if fs == 0   为什么等于0?
imagesc(t,,im,);

ylabel('normalized frequency')
else
imagesc(t,,im,);
ylabel('frequency')endset(gca,'YDir','normal') xlabel('time')title('Hilbert-Huang spectrum')
页: [1]
查看完整版本: 关于disp_hhs的几个疑问