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

📄 plot.m

📁 一种新的时频分析方法的matlab源程序。
💻 M
字号:
function h=plot(c,samescale,i,j);
% COMPONENTS/PLOT plots components in a Components structure
% Usage: (brackets indicate optional parameters)
%  h=plot(c,[samescale],[i],[j]);
%
% Input:
%  c         - the Components structure to plot
%  samescale - if non-zero, use the same vertical scale for all components
%  i         - start plotting at the i-th component (from 1)
%  j         - end plotting at the j-th components (from 1)
% Output: (optional)
%  h         - handle to the figure used

% Kenneth C. Arnold (for NASA GSFC), 2004-08-06

if nargin < 2; samescale=[]; end
if nargin < 3; i=[]; end
if nargin < 4; j=[]; end

if isempty(samescale); samescale = 0; end
if isempty(i); i=1; end
if isempty(j); j=max(size(c.d)); end

if i<1 | j > max(size(c.d))
    error('hht:outOfRange', 'Plot bounds out of range.');
end

% Set plotting area
numplots = j - i + 1;
subplot(numplots, 1, 1);

if samescale
    ymin=min(min([c.d.c]));
    ymax=max(max([c.d.c]));
    if ymin == ymax
        ymin = ymin-.1;
        ymax = ymax+.1;
    end
end

for n=i:j
    subplot(numplots, 1, n-i+1);
    plot(linspace(c.d(n).stime, c.d(n).etime, max(size(c.d(n).c))), c.d(n).c);
    if ~samescale
        ymin = min(c.d(n).c);
        ymax = max(c.d(n).c);
        if ymin == ymax
            ymin = ymin-.1;
            ymax = ymax+.1;
        end
    end
    axis([c.stime c.etime ymin ymax]);
    ylabel(['c' num2str(n)]);
end
subplot(numplots,1,1);
if i==1 & j==max(size(c.d))
    title(['Components of ' inputname(1)]);
else
    title(['Components ' num2str(i) ' through ' num2str(j) ' of ' inputname(1)]);
end
set(gcf,'NextPlot','replace');
if nargout == 1
    h=gcf;
end

⌨️ 快捷键说明

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