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

📄 wign1.m

📁 一种新的时频分析方法的matlab源程序。
💻 M
字号:
function [wg,t,f] = wign1(x,t0,t1)

% The function WIGN1 generates a Wigner distribution.
%
% The output is in equi-frequency scaling.
% The edges are not treated.
% W(t,f)=1/2pi int[s*(t-.5tau)s(t+.5tau)e^(-i tau 2pi f),d tau]
%
% Calling sequence-
% [wg,t,f]=wign1(x,t0,t1)
%
% Input-
%	x	- row vector x(n,1)
%	t0	- the true start time
%	t1	- the true end time
% Output-
%	wg	- the wigner distribution matrix wg(n/2,n)
%	t	- vector t(n) that represents the time axis
%	f	- vector f(n/2) that represents the frequency axis (Hz)
%
% See also
%	WIGN2
 
% Z. Shen (JHU)		June, 1996 Initial

nn=max(size(x));
nn1=nn*2;
s=zeros(nn1,1);
n2=nn/2;
wg=zeros(n2,nn);
s1=s;
s2=s;
for i=1:nn
   s1(1:i)=conj(flipud(x(1:i)));
   s1(i+1:nn+1)=zeros(nn-i+1,1);
   s2(1:nn-i+1)=x(i:nn);
   s2(nn-i+2:nn+1)=zeros(i,1);
   s1(nn+2:nn1)=flipud(s1(2:nn));
   s2(nn+2:nn1)=flipud(s2(2:nn));
   s=s1.*s2;
   w=real(fft(s));
   w=w(1:n2);
   wg(:,i)=w;
end
t=linspace(t0,t1,nn)';
f=linspace(0,nn/(8*(t1-t0)),n2)';

⌨️ 快捷键说明

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