LMS波束形成代码(matlab)LMS算法的仿真程序:%lms 算法clear allclose allhold off%系统信道权数sysorder = 5 ;%抽头数N=1000;%总采样次数inp = randn(N,1);%产生高斯随机系列n = randn(N,1);b,a = butter(2,0.25);Gz = tf(b,a,-1);%逆变换函数h= 0.0976;0.2873;0.3360;0.2210;0.0964;%信道特性向量y = lsim(Gz,inp);%加入噪声n = n * std(y)/(10*std(n);%噪声信号d = y + n;%期望输出信号totallength=size(d,1);%步长N=60 ; %60节点作为训练序列%算法的开始w = zeros ( sysorder , 1 ) ;%初始化for n = sysorder : Nu = inp(n:-1:n-sysorder+1) ;% u的矩阵y(n)= w * u;%系统输