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

📄 crosfft.m

📁 统计自适应信号处理的matlab程序
💻 M
字号:
function r=crosfft(x,y,Lr)
% function r=crosfft(x,y,Lr)
% Lr, the length of rxy, should be odd
%
% Programmed by: Dimitris Manolakis, 10/4/93
%
%-----------------------------------------------------------
% Copyright 2000, by Dimitris G. Manolakis, Vinay K. Ingle,
% and Stephen M. Kogon.  For use with the book
% "Statistical and Adaptive Signal Processing"
% McGraw-Hill Higher Education.
%-----------------------------------------------------------

if floor(Lr/2)*2 == Lr disp('Lag should be odd'); else end
Lx=length(x);
Ly=length(y);
L=max(Lx,Ly);
Nfft=L+Lr;
n2=round((log(Nfft)/log(2))+0.5);
Nfft=2^n2;
X=fft(x,Nfft);
Y=fft(y,Nfft);
XY=X.*conj(Y);
YX=Y.*conj(X);
%a=ifft(XY);plot(real(a));pause;plot(imag(a));pause;
%b=ifft(YX);plot(real(b));pause;plot(imag(b));pause;
xy=real(ifft(XY));
yx=real(ifft(YX));

L=1;
r=zeros(Lr,1);
L2=(Lr-1)/2;
r(1:L2)=yx(2:L2+1)/L;
r(1:L2)=flipud(r(1:L2));
r(L2+1:Lr)=xy(1:L2+1)/L;
sc=sqrt(sum(x.*x)*sum(y.*y));
r=r/sc;

⌨️ 快捷键说明

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