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

📄 mmse.m

📁 algorithm to calculate the MMSE algorithm inlab mat
💻 M
字号:
function [ ]=MMSE(M,d,angle1,angle2,angle3)

sig=0.001;
theta=-pi/2:.01:pi/2;
ang=theta*180/pi;
th0=angle1*pi/180;
th1=angle2*pi/180;
th2=angle3*pi/180;
n=1:M;
disp(('The Distorted angle for the source is:'));

% calculating the steering vectors associated with %
% each source direction %

a0=exp(1j*2*pi*d*(n-1)*sin(th0)).';
a1=exp(1j*2*pi*d*(n-1)*sin(th1)).';
a2=exp(1j*2*pi*d*(n-1)*sin(th2)).';
A=[a1 a2];
Rss=a0*a0';
Rnn=sig*eye(M);
Rii=A*A';

% calculating the noise matrix %
Ruu=Rii+Rnn;
Rxx=Ruu+Rss;
w=inv(Rxx)*a0;

for n1=1:length(theta)
    th=theta(n1);
    % calculation of steering vectors associated with each direction %
    aa=exp(1j*2*pi*d*(n-1)*sin(th)).';
    y(n1)=w'*aa;
end


% Calculation of the directional coefficient %
Y=abs(y)/max(abs(y));
figure(2);
plot(ang,Y);    			   % plotting the result in a graphical form %
xlabel('Theta');
ylabel('AF theta');
title('Minimum MSE Pattern');
axis([-90 90 0 1]);
end

⌨️ 快捷键说明

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