From: Anabel on 20 Jul 2010 07:16 Hi there, I've read many posts asking about plotting 3D graphs and 3D radiation patterns but none of them get solved properly so I'm asking again. I'm attempting to plot a 3D radiation pattern. For that I have the Azimuth (phi) angles (0..360) with 5 degree steps and the Elevation (theta) angles (0..180) with values in angles 0, 30, 45, 60, 90, 120, 135, 150, 180. And the gain I want to represent, meaning the radius. Right now my code gets semi-nice results and it basically does: F = TriScatteredInterp (phi, theta, gain); g = F(Az, El); where Az and El come from [Az El] = meshgrid(0:5:360,0:5:360); Then I transform from spherical coordinates to cartesian and plot using surf. If I try to plot without interpolating the points then Matlab gives an error because surf needs matrix as imputs instead of vectors. So do you know any other way of ploting the radiation pattern as a surface? Thank you!
From: Sergey Holmogorov on 27 Jul 2010 09:23 "Anabel " <anabel.perezdiaz(a)tut.fi> wrote in message <i240hk$8a2$1(a)fred.mathworks.com>... > Hi there, > I've read many posts asking about plotting 3D graphs and 3D radiation patterns but none of them get solved properly so I'm asking again. > > I'm attempting to plot a 3D radiation pattern. For that I have the Azimuth (phi) angles (0..360) with 5 degree steps and the Elevation (theta) angles (0..180) with values in angles 0, 30, 45, 60, 90, 120, 135, 150, 180. And the gain I want to represent, meaning the radius. > > Right now my code gets semi-nice results and it basically does: > F = TriScatteredInterp (phi, theta, gain); > g = F(Az, El); > > where Az and El come from > [Az El] = meshgrid(0:5:360,0:5:360); > > Then I transform from spherical coordinates to cartesian and plot using surf. > > If I try to plot without interpolating the points then Matlab gives an error because surf needs matrix as imputs instead of vectors. > > So do you know any other way of ploting the radiation pattern as a surface? > > Thank you! You may plot this surface simpler. You should make three matrices which contains phi, theta and R. All three matrices must be same dimensions. Then use sph2cart and then use surf.
|
Pages: 1 Prev: hsv histogram Next: SimEvents 'one-too-many' gates problem |