File Exchange

image thumbnail

Plot a 3D Radiation pattern based on an image

version 1.0.0.0 (1.63 KB) by katzumaki
Plot a 3D radiation pattern based on an image

1 Download

Updated 17 Jun 2013

View License

Hello everyone.

I'm a french student and i started to use Matlab few weeks ago (so i'm still a beginner) and i encountered a serious problem when i want plot my data.

I tried firstly to describe you what i want to do :
- I have an image of 1024x1280 that i transform into a matrix. My image is in level of gray and the value of a pixel correspond to the eneryg emitted.
- I rotate my image around the center from a angle phi (azimutal angle).
- Then i determinate the power emitted for each couple (teta,phi).
- I translate our results to spherical coordinates in cartesian coordinates with the equations :
x = r.*sin(teta).*cos(phi)
y = r.*sin(teta).*sin(phi)
z = r.*cos(teta)
with r=radial distance ; teta=polar angle ; phi=azimutal angle

I expect i was enough clear with my explications because my problem is here : when i plot the data (cf screenshot) i obtain something with lines from the center. I use the command "surf" to draw this but it's not want i want.
I would like to get a surface using only the extremum of each line so just see the edge of the figure and not the inside.

I will be really thankful if anyone has an idea to help me, even if what i ask is maybe not possible.

Cite As

katzumaki (2021). Plot a 3D Radiation pattern based on an image (https://www.mathworks.com/matlabcentral/fileexchange/42269-plot-a-3d-radiation-pattern-based-on-an-image), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Chao

Guess you should use the meshgrid to create a mesh grid and then use surf to plot. By the way, if you want to do coordinate transform between cartesian and spherical. You can use cart2sph or sph2cart.

Yehonatan Peleg

Hi.....
File exchange is not the place for questions. Its for submit files that the community can benefit of. Try using the newsgroup or MATLAB answers for questions and problems.

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!