3-D radiation pattern from antenna measurement
Show older comments
Hi,
Are there any functions that I can use to plot 3-d radiation pattern with data (azimuth,elevation and amplitude) in Matlab?
Thank you
Answers (1)
Abhipsa
on 17 Feb 2025
MATLAB File Exchange submission offers the "polarplot3d" function, which allows you to create 3D radiation patterns using polar plots: https://www.mathworks.com/matlabcentral/fileexchange/13200-3d-polar-plot. Alternatively, you can create a custom plot by using built-in functions like "meshgrid" and "surf."
Here is an example of how you can do this in MATLAB R2024b using “surf” and “meshgrid”:
% Sample data
azimuth = linspace(0, 2*pi, 360); % Azimuth angles in radians
elevation = linspace(-pi/2, pi/2, 180); % Elevation angles in radians
[Az, El] = meshgrid(azimuth, elevation);
% Sample amplitude data (replace with your actual data)
amplitude = abs(sin(El) .* cos(Az));
% Convert spherical to Cartesian coordinates
[X, Y, Z] = sph2cart(Az, El, amplitude);
% Plot the 3D radiation pattern
figure;
surf(X, Y, Z, amplitude, 'EdgeColor', 'none');
colormap(jet);
colorbar;
xlabel('X');
ylabel('Y');
zlabel('Z');
title('3D Radiation Pattern');
axis equal;
view(3);
The output for the above code:

You can refer to the below MATLAB documentations for more details:
- sph2cart: https://www.mathworks.com/help/matlab/ref/sph2cart.html
- meshgrid: https://www.mathworks.com/help/matlab/ref/meshgrid.html
- surf: https://www.mathworks.com/help/matlab/ref/surf.html
To access documentation pages for the release that you are using, you can use the "doc" command in MATLAB command window (https://www.mathworks.com/help/matlab/ref/doc.html).
I hope this helps!
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!