SCHIERE DI ANTENNE FILIFORMI BROADSIDE Listato del programma broadside.m
% disegno del grafico del
fattore di schiera F e del corrispondente % fattore di irradiazione
totale ftot % delle schiere di
antenne filiformi broadside clear
all close
all lm=1; N=3; d=((N-1)/N)*lm; kod=(2*pi/lm)*d; u=-kod:0.01:kod; u1=-2*pi:0.01:2*pi; y=abs(sin((N/2)*u)./sin((1/2)*u)); y1=abs(sin((N/2)*u1)./sin((1/2)*u1)); plot(u1,y1,'r',u,y,'k') title('grafico
di F=abs(sin((N/2)*u)/sin((1/2)*u))') xlabel('u') zoom grid clear
y x=0:0.01:2*pi; y=abs(sin((N/2)*kod*cos(x))./sin((1/2)*kod*cos(x))); figure plot(x,y) title('grafico
di F=sin((N/2*k0*d*cos(\Psi))./sin((1/2)*k0*d*cos(\Psi));') xlabel('\Psi') zoom grid clear
x y phi=0:.1:2*pi; %
è il TH del MATLAB th=0:.1:pi;
% è pi/2-PHI del MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
R=sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*kod*sin(th(i))*...
cos(phi(j)))*(cos((pi/2)*cos(th(i)))/sin(th(i)));
[x(h),y(h),z(h)]=sph2cart(phi(j),pi/2-th(i),R);
end end end for i=1:length(th)
for j=1:length(phi)
if sin(th(i))~=0
h=h+1;
R=sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*kod*sin(th(i))*...
cos(phi(j)))*(cos((pi/2)*cos(th(i)))/sin(th(i)));
[x(h),y(h),z(h)]=sph2cart(phi(j),pi/2-th(i),R);
end end end clear
R TH phi th RD phi=-0.01:0.01:2*pi; %
è il TH del MATLAB th=pi/2;
% è pi/2-PHI del MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
RR=sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*...
kod*sin(th(i))*cos(phi(j)));
[xx(h),yy(h),zz(h)]=sph2cart(phi(j),pi/2-th(i),RR);
end
end end clear
R TH phi th phi=0;
% è il TH del
MATLAB th=-0.01:0.01:2*pi; % è pi/2-PHI del
MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
RRR=sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*kod*sin(th(i))*...
cos(phi(j)));
[xxx(h),yyy(h),zzz(h)]=sph2cart(phi(j),pi/2-th(i),RRR);
end end end clear
R TH phi th phi=pi/2; %
è il TH del MATLAB th=-0.01:0.01:2*pi; % è pi/2-PHI del
MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
RRRR=sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*kod*...
sin(th(i))*cos(phi(j)));
[xxxx(h),yyyy(h),zzzz(h)]=sph2cart(phi(j),pi/2-th(i),RRRR);
end end end clear
R TH TH=0:0.01:2*pi; for i=1:length(TH)
if sin(TH(i))~=0
R(i)=sin((N/2)*kod*cos(TH(i)))/sin((1/2)*kod*cos(TH(i)));
end end figure polar(TH,R); title('grafico:
sin((N/2)*ko*d*cos(\Psi))/sin((1/2)*ko*d*cos(\Psi))') figure plot(xx,yy) xlabel('x') ylabel('y') title('FATTORE
DI SCHIERA'); axis
equal grid figure plot(yyyy,zzzz') xlabel('y') ylabel('z') title('FATTORE
DI SCHIERA'); axis
equal grid figure plot(xxx,zzz) xlabel('x') ylabel('z') title('FATTORE
DI SCHIERA'); axis
equal grid % % % figure plot3(x,y,z) grid xlabel('x') ylabel('y') zlabel('z') title('ftot'); clear x y R RR
RRR RRRR xx xxx xxxx yy yyy yyyy zz zzz zzzz TH phi th phi=-0.01:0.01:2*pi; %
è il TH del MATLAB th=pi/2;
% è pi/2-PHI del MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
RR=abs(sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*...
kod*sin(th(i))*cos(phi(j)))*(cos((pi/2)*cos(th(i)))/sin(th(i))));
[xx(h),yy(h),zz(h)]=sph2cart(phi(j),pi/2-th(i),RR);
end end end clear
R TH phi th phi=0;
% è il TH del MATLAB th=-0.01:0.01:2*pi; % è pi/2-PHI del
MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
RRR=abs(sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*... kod*sin(th(i))*cos(phi(j)))*(cos((pi/2)*cos(th(i)))/sin(th(i))));
[xxx(h),yyy(h),zzz(h)]=sph2cart(phi(j),pi/2-th(i),RRR);
end end end clear
R TH phi th phi=pi/2; %
è il TH del MATLAB th=-0.01:0.01:2*pi; % è pi/2-PHI del
MATLAB h=0; for j=1:length(phi)
for i=1:length(th)
if sin(th(i))~=0
h=h+1;
RRRR=abs(sin((N/2)*kod*sin(th(i))*cos(phi(j)))/sin((1/2)*kod*...
sin(th(i))*cos(phi(j)))*(cos((pi/2)*cos(th(i)))/sin(th(i))));
[xxxx(h),yyyy(h),zzzz(h)]=sph2cart(phi(j),pi/2-th(i),RRRR);
end
end end clear
R TH figure plot(xx,yy) xlabel('x') ylabel('y') title('fattore
di irradiazione totale'); axis
equal grid figure plot(yyyy,zzzz') xlabel('y') ylabel('z') title('fattore
di irradiazione totale'); axis
equal grid figure plot(xxx,zzz) xlabel('x') ylabel('z') title('fattore
di irradiazione totale'); axis equal grid
|