What are the point locations for EHfields() function output?
Afficher commentaires plus anciens
When I run the EHfields function like this:
[e,h] = EHfields(antenna_object,frequency)
The size of the output e is 3 * 441. Where 3 is the x,y and z component of the computed electric field.
When I run the function like this:
[eh,~]=EHfields(antenna_object,frequency, Polarization="H");
The size of the output eh is 1 * 441. Where 1 is the horizontal compoenent of the computed electric field.
My question is the 441. I am guessing that it is the index of the points evaluated as a unit sphere around the antenna. But in what ordered are they counted?
From Antenna Toolbox Coordinate Sytem it could be that it is counted from the azimuth angle from the positive x-axis to the vector's orthogonal projection onto the xy plane, moving in the direction towards the y-axis and ranges from –180 and 180 degrees, and the elevation angle from the vector's orthogonal projection on the xy plane toward the positive z-axis and ranges from –90 and 90 degrees.
But I don't know for sure. I cannot find documentation clearifying how exactly are these points ordered, spaced and located. Perhaps a staff's answer can be much helpful?
Thanks
Réponse acceptée
Plus de réponses (1)
Maxime
le 13 Mar 2024
0 votes
Hello there,
Your answer was hepful to understand a bit more about the output of EHfields. Still I don't see how the 3-by-p output is arranged in detail. Is azimuth fixed and then elevation varies ? Then building a matrix where the first 21 components are the elevation for a fixed azimuth, the 21 next are the components for a new azimuth fixed and all elevation, etc..
Thank you,
Maxime H.
2 commentaires
David Goodmanson
le 18 Mar 2024
Hello Maxime,
Whether you get 3x441 or 1x441 is up to the details of EHfields output and I do not have access to that function. But suppose you consider the transpose of those to get 441x3 or 441x1. What is quite likely happening is that the function creates 21x21 matrices for phi and theta and then reads those matrices out columnwise to get the 441. Using the 5x5 example above, then
phicol = phi(:)
reads out the 5x5 columnwise into a 1x25 column. Similarly with
thcol = thl(:)
for theta. For display purposes here,
phiandtheta = [phicol thcol]
puts those two columns side by side:
phiandtheta =
-3.1416 3.1416
-3.1416 2.3562
-3.1416 1.5708
-3.1416 0.7854
-3.1416 0
-1.5708 3.1416
-1.5708 2.3562
-1.5708 1.5708
-1.5708 0.7854
-1.5708 0
0 3.1416
0 2.3562
0 1.5708
0 0.7854
0 0
1.5708 3.1416
1.5708 2.3562
1.5708 1.5708
1.5708 0.7854
1.5708 0
3.1416 3.1416
3.1416 2.3562
3.1416 1.5708
3.1416 0.7854
3.1416 0
If you had phicol and no longer had the 5x5 matrix phi, you could get it back with
phi = reshape(phicol,5,5)
which reads it back in columnwise.
As to the antenna toolbox, is it doing
th1 = linspace(pi,0,21);
phi1 = linspace(-pi,pi,21);
[phi th] = meshgrid(phi1,th1);
which reproduces the output of the sphere command? I don't know. I suppose the antenna toolbox documantation tells you. Failing that, you do have the field components in 441x1 columns, and for a given dipole source and field component you could reshape those to 21x21 and see what makes sense.
Maxime
le 19 Mar 2024
Thank you for this complete answer.
Catégories
En savoir plus sur Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!