昨天试着编了一下泰勒线源综合的程序,结果如下,输入副瓣电平SLL,阵元个数n,等副瓣数n1,就可以得到电流分布I(i)SLL=input('请输入SLL=');n=input('请输入n=');n1=input('请输入n1=');R0=10^(SLL/-20);A=(1/pi)*acosh(R0);n0=2*A^2+4;x=ones(1,n);lamda_g=10.73;d=lamda_g/2;L=(n)*d;fori=1:nifi=n1-1x(i)=(n1)^2*(A^2+(i-1/2)^2)/(A^2+(n1-1/2)^2);elsex(i)=i^2;endendforj=1:nifjn1fork=1:n1-1B(j,k)=1-j^2/x(k);end;B1=B(j,:);s(j)=(factorial(n1-1))^2/(factorial(n1-1+j)*factorial(n1-1-j))*prod(B1);elses(j)=0;endendifmod(n,2)0;foro=1:(n-1)/2+1z(o)=(o-1)*d;endforl=1:(n-1)/2+1form=1:n1-1z0(l,m)=s(m)*cos(2*m*pi*z(l)/L);endI1(l)=1+2*sum(z0(l,:));endmax1=I1(1);fori=1:(n-1)/2I(i)=I1((n-1)/2+2-i)/max1;I(n+1-i)=I(i);endI((n-1)/2+1)=1;elseforo=1:n/2z(o)=(2*o-1)/2*d;endforl=1:n/2form=1:n1-1z0(l,m)=s(m)*cos(2*m*pi*z(l)/L);endI1(l)=1+2*sum(z0(l,:));endmax1=I1(1);fori=1:n/2I(i)=I1(n/2+1-i)/max1;I(n+1-i)=I(i);endend