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

📄 hist.m

📁 一种新的时频分析方法的matlab源程序。
💻 M
字号:
function h=hist(c,i,j,bins);
% COMPONENTS/HIST plots histograms of components in a Components structure
%
% Usage: (brackets indicate optional parameters)
%  h=hist(c,[i],[j],[bins]);
%
% Input:
%  c    - the Components structure to plot
%  i    - start plotting at the i-th component (from 1)
%  j    - end plotting at the j-th components (from 1)
%  bins - The number of bins to use for the histogram
%
% Output: (optional)
%  h    - handle to the figure used

% Kenneth C. Arnold (for NASA GSFC), 2004-08-06
if nargin < 2; i=[]; end
if nargin < 3; j=[]; end
if nargin < 4; bins=[]; end

if isempty(i); i=1; end
if isempty(j); j=max(size(c.d)); end
if isempty(bins); bins=10; 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);

for n=i:j
    subplot(numplots, 1, n-i+1);
    hist(c.d(n).c, bins);
    ylabel(['c' num2str(n)]);
end
subplot(numplots,1,1);
if i==1 & j==max(size(c.d))
    title(['Histogram of ' inputname(1)]);
else
    title(['Histogram ' 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 + -