?? plot.m
字號(hào):
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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -