1. 均匀线阵方向图(1)matlab 程序clc;clear all;close all;imag=sqrt(-1);element_num=32;%阵元数为8d_lamda=1/2;%阵元间距d与波长lamda的关系theta=linspace(-pi/2,pi/2,200);theta0=0;%来波方向w=exp(imag*2*pi*d_lamda*sin(theta0)*0:element_num-1);for j=1:length(theta) a=exp(imag*2*pi*d_lamda*sin(theta(j)*0:element_num-1); p(j)=w*a;endpatternmag=abs(p);patternmagnorm=patternmag/max(max(patternmag);patterndB=20*log10(patternmag);patterndBnorm=20*log10(patternmagnorm);figure(1)plot(