二维极坐标天线方向图在直角坐标系已经画出来了,但是不知道用极坐标在matlab中怎么画?程序如下:%%LMSclear,clcm=8; %sensorsn=2; %sourcestheta=[0 -45]; %in angled=1/2; %1/2lambadaN=500; %samplesL=100; %resolution in[
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/06 21:09:27
![二维极坐标天线方向图在直角坐标系已经画出来了,但是不知道用极坐标在matlab中怎么画?程序如下:%%LMSclear,clcm=8; %sensorsn=2; %sourcestheta=[0 -45]; %in angled=1/2; %1/2lambadaN=500; %samplesL=100; %resolution in[](/uploads/image/z/6720054-6-4.jpg?t=%E4%BA%8C%E7%BB%B4%E6%9E%81%E5%9D%90%E6%A0%87%E5%A4%A9%E7%BA%BF%E6%96%B9%E5%90%91%E5%9B%BE%E5%9C%A8%E7%9B%B4%E8%A7%92%E5%9D%90%E6%A0%87%E7%B3%BB%E5%B7%B2%E7%BB%8F%E7%94%BB%E5%87%BA%E6%9D%A5%E4%BA%86%2C%E4%BD%86%E6%98%AF%E4%B8%8D%E7%9F%A5%E9%81%93%E7%94%A8%E6%9E%81%E5%9D%90%E6%A0%87%E5%9C%A8matlab%E4%B8%AD%E6%80%8E%E4%B9%88%E7%94%BB%3F%E7%A8%8B%E5%BA%8F%E5%A6%82%E4%B8%8B%EF%BC%9A%25%25LMSclear%2Cclcm%3D8%3B+%25sensorsn%3D2%3B+%25sourcestheta%3D%5B0+-45%5D%3B+%25in+angled%3D1%2F2%3B+%251%2F2lambadaN%3D500%3B+%25samplesL%3D100%3B+%25resolution+in%5B)
二维极坐标天线方向图在直角坐标系已经画出来了,但是不知道用极坐标在matlab中怎么画?程序如下:%%LMSclear,clcm=8; %sensorsn=2; %sourcestheta=[0 -45]; %in angled=1/2; %1/2lambadaN=500; %samplesL=100; %resolution in[
二维极坐标天线方向图在直角坐标系已经画出来了,但是不知道用极坐标在matlab中怎么画?
程序如下:
%%LMS
clear,clc
m=8; %sensors
n=2; %sources
theta=[0 -45]; %in angle
d=1/2; %1/2lambada
N=500; %samples
L=100; %resolution in[-90’ 90’]
c=0.0001; %是为了防止过小而引起步长过大,从而导致算法的发散
%generate the source signals
%s=2*round(rand(n,N))-1;
s=round(rand(n,N));
%generate the A matrix
A=exp(-j*2*pi*d*[0:m-1].'*sin(theta*pi/180));
%generate the noise component
e=0.1*(randn(m,N));
%generate the ULA data
Y=A*s+e;
h=cov(Y.');
mu=1/(20*trace(h)); %设定步长因子
%initialize weight matrix and associated Parameters for LMS predictor
de=s(1,:);
w=zeros(m,1);
for k=1:N
%Predict next sample and error
y(k)=w'*Y(:,k);
e(k)=de(k)-y(k);
%adapt weight matrix and step size
w=w+mu*Y(:,k)*conj(e(k));
end
% beamforming using the LMS method
beam=zeros(1,L);
for i=1:L
a=exp(-j*2*pi*d*[0:m-1].'*sin(-pi/2+pi*(i-1)/L));
beam(i)=20*log10(abs(w'*a));
end
%Plotting command followed
figure
angle=-90:180/L:(90-180/L);
plot(angle,beam);
grid on
xlabel('angle');
ylabel('幅度响应/dB');
title('LMS算法波束成形');
figure
for k=1:N
en(k)=abs(e(k)^2);
end
plot(en);
grid on
xlabel('angle');
ylabel('幅度响应/dB');
title('LMS算法稳态误差');
二维极坐标天线方向图在直角坐标系已经画出来了,但是不知道用极坐标在matlab中怎么画?程序如下:%%LMSclear,clcm=8; %sensorsn=2; %sourcestheta=[0 -45]; %in angled=1/2; %1/2lambadaN=500; %samplesL=100; %resolution in[
极坐标画图,在matlab里用polar(theta,rho)
theta是幅角,rho是径失