Hello Théo
It is my understanding that you have modelled a dipole antenna and want to calculate the directivity values of the signal from the antenna at different points on a 3D plane parallel to different axes.
I have tested the code provided in the post. According to my investigation, the output argument ‘valueMatrix’ stores real, double values as follows for the default antenna configuration provided by you for a plane parallel to the Y-axis.:
Further testing after tilting the antenna gave the following results:
- planToDisplay = "X/Y": The output argument ‘valueMatrix’ stores real, double values.
- planToDisplay = "X/Z": The output argument ‘valueMatrix’ stores complex double values.
- planToDisplay = "Y/Z": The output argument ‘valueMatrix’ stores real, double values.
Complex values are obtained for the case planToDisplay = "X/Z" because the directivity values calculated for the antenna in that plane are negative and the variable ‘Eeff’ is defined as ‘sqrt(30*10000.0*2.0*direct)/r’ and square root of negative values returns complex values.
In MATLAB, the function ‘pattern’ calculates directivity and returns the values that have the unit as ‘decibel relative to isotropic’(dBi). Directivity is the ratio of the radiation intensity in a given direction from the antenna to the radiation intensity averaged over all directions. Negative decibel values signify that the ratio of radiation intensity in a given direction from the antenna to the radiation intensity averaged over all directions is less than 1. Effectively, it means that the intensity of the radiation in that particular direction is weak and the antenna is not radiating very well at all in that direction in comparison to a dipole. A directional antenna may have good gain in one direction and poor gain in others.
For more information on this, you can refer the following resources :
- Refer to the “Output Arguments ” section. https://in.mathworks.com/help/antenna/ref/fieldanalysiswithfeed.pattern.html
- Function 'pattern': https://in.mathworks.com/help/antenna/ref/fieldanalysiswithfeed.pattern.html
I hope this helps!