How to calculate array factor in matlab
Mostrar comentarios más antiguos

I m trying to write matlab code for this expression.
Can anyone help me with this?
Thanks!!!!
11 comentarios
Rik
el 23 de Dic. de 2021
What have you tried so far? This doesn't look like it should be too complicated to write.
Note that the subscripts are very hard to read in your image.
FARHA KHAN
el 23 de Dic. de 2021
Editada: Rik
el 23 de Dic. de 2021
FARHA KHAN
el 23 de Dic. de 2021
Rik
el 23 de Dic. de 2021
I can't properly read you function, so I can't absolutely confirm you did it correctly.
The main advice I have for you is to split your calculation into several parts you can more easily read. One main thing would be to move the calls to deg2rad outside the loop.
If you post a clearer version of your mathematical notation I can try to help you check if this is correct.
FARHA KHAN
el 23 de Dic. de 2021
Rik
el 23 de Dic. de 2021
Yes, this I can read.
I would convert this to Matlab as follows:
lambda=__;
M=2;
N=[4 16];
K=(2*pi)/lambda;
r=[0.5 2.5]*lambda;
theta=0;
phi=[90:90:360 zeros(1,12); ...
22.5:22.5:360];
phi_=0;
alpha=__;
s=0;
for m=1:M
for n=1:N(m)
tmp=K * r(m) * sin(theta) * cos(phi_-phi(m,n)) + alpha(m,n);
s=s + W(m) * exp(1j*tmp);
end
end
FARHA KHAN
el 23 de Dic. de 2021
FARHA KHAN
el 23 de Dic. de 2021
Editada: Walter Roberson
el 24 de Dic. de 2021
FARHA KHAN
el 23 de Dic. de 2021
Rik
el 23 de Dic. de 2021
You could also calculate alpha in your loop:
s=0;
for m=1:M
for n=1:N(m)
alpha=-K*r(m)*cos(phi0-phi(m,n));
tmp=K * r(m) * sin(theta) * cos(phi0-phi(m,n)) + alpha;
s=s + W(m) * exp(1j*tmp);
end
end
FARHA KHAN
el 24 de Dic. de 2021
Respuestas (0)
Categorías
Más información sobre MATLAB Support Package for Raspberry Pi Hardware en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
