3-D radiation pattern
古いコメントを表示
Hi,
I have do have a set of data including azimuth, elevation that are in degrees and amplitude. I am just trying to get a 3-D scatter plot with these data and this is what I am getting after converting into Cartesian form.

But I am supposed to get something similar like below,

Are there any useful functions I can use to generate 3-D radiation pattern? I am using Matlab R2013a
Thank you
回答 (1 件)
Samayochita
2025 年 2 月 14 日
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!
カテゴリ
ヘルプ センター および File Exchange で Phased Array Design and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!