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

📄 plotcsold.m

📁 一种新的时频分析方法的matlab源程序。
💻 M
字号:
function  nt= plotcs(c,delt,i,j,samescale)
%
% plotcs(c,delt,i,j,samescale):
%
% Function to make subplots, from I-th to J-th component,
% where delt = delta time increment, like .01 for A/D at 100 Hz.
%
% Input-
%	c		    - component data array
%	i		    - start plot at component i
%	j		    - end plot at component j
%	samescale	- = 1 if you want all components on the same scale
% Output-
%	nt		    - the handle of the figure
%
% Steven R. Long (NASA GSFC / WFF)	04 June 2003 Initial
% Kenneth C. Arnold (NASA GSFC)		31 July 2003 Modified
%					                (added samescale)
% Kenneth C. Arnold			        19.Jan. 2004 Modified
%					                (made i, j optional)
% Kenneth C. Arnold			        20.Jan. 2004 Modified
%					                (reversed c and delt)
% Jelena Marshak			        24 Apr. 2004 Modified
%					(assigned the handle, commented reversed case)

% handle default parameters
if nargin < 2
    delt = [];
end
if nargin < 3
    i = [];
end
if nargin < 4
    j = [];
end
if nargin < 5
    samescale=0;
end

if isempty(delt)
    delt = 1;
end
if isempty(i)
    i = 1;
end
if isempty(j)
    j = min(size(c));
end

[rows,cols] = size(c)                   ; % Get Data Size, Shape

%if rows < cols                          ; % Set Orientation
 % c = c'                                ; % Make Column Data
 %end                                     ;

%numpts = max(size(c))                   ; % Get Number of Data Pts.
numpts=rows;
t = (1:numpts)'*delt                    ; % Create Time Axis

numplots = j - i + 1                    ; % Set Number of Plots

subplot(numplots,1,1)                   ; % Set Plotting Area

t1=min(t(1),t(numpts))                  ; % Axis Min.
t2=max(t(1),t(numpts))                  ; % Axis Max.

if samescale
    cmax=max(max(c));
    cmin=min(min(c));
end

for jj=i:j;                             % Plotting Loop
   subplot(numplots,1,jj+1-i)           ;
   plot(t,c(:,jj));
%   if jj ~= j                           ; % All But Last Plot
       if samescale
           axis([t1 t2 cmin cmax]);
       else
           axis([t1 t2 min(c(:,jj)) max(c(:,jj))]);
       end
%   end                                  ;
   s1='c'                               ;
   s2=[s1 num2str(jj)]                  ;
   ylabel(s2)                           ;
end                                     ;
subplot(numplots,1,1)                   ;
title('Components')                     ;
nt=1;
return                                  ;

⌨️ 快捷键说明

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