Hi Mike,
To generate a 3D radiation pattern in MATLAB, you can use functions like “meshgrid”, “sph2cart”, “surf” etc. You can follow the below steps to do so:
- Convert azimuth, elevation, and amplitude into Cartesian coordinates.
- Use a visualization method such as “surf”, “meshgrid”, or “sph2cart” instead of “scatter3”.
- Normalize the amplitude if necessary.
I have written an example code for your reference:
%replace this with your actual data
az = linspace(0, 360, 50); % Azimuth angles
el = linspace(-90, 90, 50); % Elevation angles
[AZ, EL] = meshgrid(deg2rad(az), deg2rad(el)); % Convert to radians
% amplitude pattern
R = abs(cos(EL) .* cos(AZ));
% Convert to Cartesian coordinates
[X, Y, Z] = sph2cart(AZ, EL, R);
% Plot using surf
figure;
surf(X, Y, Z, R, 'EdgeColor', 'none');
colormap(jet);
colorbar; % Show amplitude scale
xlabel('X'); ylabel('Y'); zlabel('Z');
title('3D Radiation Pattern Example');
axis equal;
view(3);
grid on;

Documentation for reference:
- sph2cart : https://www.mathworks.com/help/matlab/ref/sph2cart.html
- surf : https://www.mathworks.com/help/matlab/ref/surf.html
- meshgrid : https://www.mathworks.com/help/matlab/ref/meshgrid.html
Hope this helps!