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

📄 plotifl.m

📁 matlab中用于信号处理的工具箱
💻 M
字号:
function plotifl(t,iflaws,signal);%PLOTIFL Plot normalized instantaneous frequency laws.% 	PLOTIFL(T,IFLAWS,SIGNAL) plot the normalized instantaneous frequency % 	laws of each signal component.%% 	T      : time instants,% 	IFLAWS : (M,P)-matrix where each column corresponds to%                the instantaneous frequency law of an (M,1)-signal,%	         These P signals do not need to be present at the same %                time instants.%                The values of IFLAWS must be between -0.5 and 0.5.%       SIGNAL : if the signal is precised, display it also %% 	Example : %        N=140; t=0:N-1; [x1,if1]=fmlin(N,0.05,0.3); %        [x2,if2]=fmsin(70,0.35,0.45,60);x1(35+(1:70))=x1(35+(1:70))+2*x2;%        if2=[zeros(35,1)*NaN;if2;zeros(N-70-35,1)*NaN];%        figure(1); clf; plotifl(t,[if1 if2]);%        figure(2); clf; plotifl(t,[if1 if2],x1);%%	See also TFRIDEAL, PLOTSID.% 	F. Auger, August 94, August 95, May 1998.%	Copyright (c) 1996 by CNRS (France).%%	------------------- CONFIDENTIAL PROGRAM -------------------- %	This program can not be used without the authorization of its%	author(s). For any comment or bug report, please send e-mail to %	f.auger@ieee.org if (nargin<2), error('2 parameters are required'); end;[trow,tcol] = size(t);[ifrow,ifcol]=size(iflaws); indices=find(1-isnan(iflaws));maxif=max(max(iflaws(indices))); minif=min(min(iflaws(indices)));if (trow~=1), error('t must only have one row'); elseif (tcol~=ifrow), error('T must have as many lines as iflaws has columns');elseif (maxif > 0.5) | (minif < -0.5), disp('Each element of IFLAWS should be between -0.5 and 0.5'); end;if (nargin==3), [Nsig,Ncol]=size(signal); if Ncol~=1,   error('SIGNAL must have one column');  elseif (Nsig~=tcol),  error('signal must have as many lines as t has rows'); end clf; set(gcf,'Resize','On','NextPlot','Add'); axsig = axes('Units','normal','Visible','on','Box','On','position', [0.10 0.69 0.80 0.25]); axes(axsig);  plot(t,real(signal));  set(gca, 'XLim',[min(t),max(t)], 'XGrid','on', 'YGrid','on'); title('signal'); axtfr = axes('Units','normal','Visible','on','Box','On',...              'position', [0.10 0.12 0.80 0.45]); axes(axtfr); else clf; axes(gca);end;plot(t,iflaws); if (minif>=0), set(gca,'XLim',[min(t),max(t)], 'XGrid','on','YLim',[0 0.5], 'YGrid','on');else set(gca,'XLim',[min(t),max(t)], 'XGrid','on','YLim',[-0.5 0.5], 'YGrid','on');end;xlabel('Time');ylabel('Normalized frequency');title('Instantaneous frequency law(s)');

⌨️ 快捷键说明

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