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

📄 bispectr.m

📁 高阶谱工具箱 Version 2.0.3 (R12 compliant) 27 Dec 2
💻 M
字号:
function [varargout]=bispectr(x,nf,nt,fs)
% [varargout]=bispectr(x,nf,nt,fs)
% This function calculates the bispectrum estimation of input signal
% in one square of bispectrum plane (F1<Fnyquist,F2<Fnyquist/2)
% with averaging in time and in frequency plane. 
% x-input vector
% nf-size of frequency window averaging square 
% nt-number of time realisations in x (time blocks)
% fs-frequency sampling of x
% the output variables are:
% y-(varagout(1))-is the bispectrum of x;
% y=bispectr(x,nf,nt,fs)
% (varagout(2),varagout(3))-frequencies for the y
% [y,f1,f2]=bispectr(x,nf,nt,fs);
% Designed by Eugene V.Makarov makarov@wl.unn.ru
% $Date: 2003/07/15 
x=x(:)';
lx=length(x)/nt;
y=0;
for q=0:nt-1
a=fft(x(1+q*lx:lx+q*lx)-mean(x(1+q*lx:lx+q*lx)) );
y=y+bsp(a,nf);
end
y=y/(nt*nf^2);
varargout{1}=y;
if nargout==2
 varargout{2}=fs*(1:lx/(4*nf))/(lx/(4*nf));
end
if nargout==3
 varargout{2}=fs*(1:lx/(4*nf))/(lx/(4*nf));
 varargout{3}=fs*(1:lx/(2*nf))/(lx/(2*nf));
end
if nargout>3
    error('check number of arguments')
end

⌨️ 快捷键说明

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