Hello, I have completed this code but the problem is that I cant plot.. My matla
ID: 2079641 • Letter: H
Question
Hello, I have completed this code but the problem is that I cant plot.. My matlab code is below:
Last part is the problem. so can you help me solve this part (plot)? Thank you
clear all close all sinsert equation of E field eta. 120 pi lamda (3* (10 8)) (2.4* (10 9) k (2*pi) /lamda rad lamda/2 radius of the antenna array NN 8 no of antennas OAM-0 OAM state $create global coordinate system. x 0.1 0.01 0.1 parameters of x coordinates in meters z 0.1 0.01 0.1 parameters of z coordinates in meters y 0:0. 01:1 y 3:0.06:3.12; slength of matrix x length (x) h (y) lengt Z length (z) &global; field points for Real Source GFP Ze ros 2,3) (Y*X*Z, SP zeros (NN, 3) incremental value incremental value STo create the Global Field points for Real Source for iz 1:Z for iy 1 Y for a value of y, increment in x for ix 1:X increment by 1 aa+1 GFP (aa, 1) x (ix) GFP (aa, 2) y (iv) GFP (aa, 3) z (iz) endExplanation / Answer
clear all;
close all;
eta =120*pi;
I=1;
lambda =(3*(10^8))/(2.4*(10^9));
k=(2*pi)/lamda;
rad=lambda/2;
NN=8;
OAM=0;
x=0.1:0.01:0.1;
z=0.1:0.01:0.1;
y=3:0.06:3.12;
X= length (x);
Y= length (y);
Z= length (z);
GFP = Zeroes (Y*X*Z,3);
SP= zeroes (NN, 3);
aa=0;
for iz =1:Z
for iy= 1:Y
for ix = 1:X;
aa=aa+1;
GFP(aa,1)= x(ix);
GFP(aa,2)=y(iy);
GFP(aa,3)=z(iz);
end
end
end
for n= 1:NN
SP(n,1) =rad*cos(n*2*pi/NN);
SP(n,2)=0;
SP(n,3)=rad*sin(n*2*pi/NN);
R(:,1,n)= GFP(:,1)-SP(n,1);
R(:,2,n)=GFP(:,2)-SP(n,2);
R(:,3,n)=GFP(:,3)-SP(n,3);
magR(:,n)=sqrt((R(:,1,n).^2)+(R(:,2,n).^2)+(R(:,3,n).^2));
theta(:,n)=acos(R(:,3,n)./magR(:,n));
phi(:,n)=atan((R(:,2,n))./R(:,1,n));
E(:,n)=((1i*eta*I).*(exp((OAM*1i*2*pi.*n)/NN)).*(exp((-1i)*k.*magR(:,n))).*sin(theta(:,n))./(2*pi)
Ex(:,n)=E(:,n).*cos(theta(:,n)).*cos(phi(:,n));
Ey(:,n)=E(:,n).*cos(theta(:,n)).*sin(phi(:,n));
Ez(:,n)=E(:,n).*(-sin(theta(:,n)));
Eztotal=sum(Ez,2);
Ezztotal=reshape(Eztotal, [X,Z,Y]);
Hxxtotal=Ezztotal/(120*pi);
poyn=cross(Ezztotal,conj(Hxxtotal));
plot(y,abs(poyn(11,11,0:)));
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.