Thread Subject: Plotting 3-d functions (Spherical Harmonics)

Subject: Plotting 3-d functions (Spherical Harmonics)

From: Christopher Hart

Date: 16 Apr, 2009 15:00:19

Message: 1 of 6

So I've had little experience with Matlab and I'm finding it difficult to plot a 3-d Spherical harmonic wave in polar coordinates. In Mathmatica this isn't a difficult thing to do but my lack of experience with Matlab is posing as an issue. My Modern Physics instructor would like us to plot the following Normalized Spherical Harmonic functions. Any help would be appreciated. Please give specific details because I still don’t know many of the commands. Thanks!

Here is the url for the functions. I simply scanned them in instead of manually typing them out:
http://farm4.static.flickr.com/3361/3447815798_3c2b8b8067.jpg?v=0

Subject: Plotting 3-d functions (Spherical Harmonics)

From: TideMan

Date: 17 Apr, 2009 02:36:01

Message: 2 of 6

On Apr 17, 3:00=A0am, "Christopher Hart" <char...@hotmail.com> wrote:
> So I've had little experience with Matlab and I'm finding it difficult to=
 plot a 3-d Spherical harmonic wave in polar coordinates. =A0In Mathmatica =
this isn't a difficult thing to do but my lack of experience with Matlab is=
 posing as an issue. =A0My Modern Physics instructor would like us to plot =
the following Normalized Spherical Harmonic functions. =A0Any help would be=
 appreciated. =A0Please give specific details because I still don=92t know =
many of the commands. =A0Thanks! =A0
>
> Here is the url for the functions. =A0I simply scanned them in instead of=
 manually typing them out:http://farm4.static.flickr.com/3361/3447815798_3c=
2b8b8067.jpg?v=3D0

I don't understand.
If it's so easy to do in Mathmatica (sic), then why don't you use that
instead of Matlab?

Unless, of course, your "Modern Physics instructor" wants you to learn
Matlab, using this as an exercise. If this is the case, then why are
you asking us? You should do your own homework.

Subject: Plotting 3-d functions (Spherical Harmonics)

From: Christopher Hart

Date: 17 Apr, 2009 03:21:01

Message: 3 of 6

You're right my instructor is looking to get us familiarized with Matlab. I’m horrible with software like this which is why I was looking here for some help because I can’t figure it out. I was hoping for a little bit of help but apparently people want to be jerks about asking a question. I wasn’t looking for someone to do my homework for me. I was looking for someone to direct me in the right direction but apparently that’s too much to ask. Apparently Tideman you’re not one who has ever asked for help. Instead of posting destructive criticism why not just post nothing at all. Jerk!

Subject: Plotting 3-d functions (Spherical Harmonics)

From: TideMan

Date: 17 Apr, 2009 03:39:42

Message: 4 of 6

On Apr 17, 3:21=A0pm, "Christopher Hart" <char...@hotmail.com> wrote:
> You're right my instructor is looking to get us familiarized with Matlab.=
 =A0I=92m horrible with software like this which is why I was looking here =
for some help because I can=92t figure it out. =A0I was hoping for a little=
 bit of help but apparently people want to be jerks about asking a question=
. =A0I wasn=92t looking for someone to do my homework for me. =A0I was look=
ing for someone to direct me in the right direction but apparently that=92s=
 too much to ask. =A0Apparently Tideman you=92re not one who has ever asked=
 for help. =A0Instead of posting destructive criticism why not just post no=
thing at all. Jerk!

Oh, I see. I'm sorry. I must have misinterpreted this statement of
yours:
"Please give specific details because I still don=92t know many of the
commands."
If you are just "looking for someone to direct me in the right
direction", what did you mean by asking for "specific details"?

But it's Friday afternoon here and I'm feeling generous, so here is a
hint that will direct you in the right direction, as requested: RTFM

Subject: Plotting 3-d functions (Spherical Harmonics)

From: Ken Garrard

Date: 17 Apr, 2009 14:24:01

Message: 5 of 6

"Christopher Hart" <chart47@hotmail.com> wrote in message <gs7h63$otc$1@fred.mathworks.com>...
> So I've had little experience with Matlab and I'm finding it difficult to plot a 3-d Spherical harmonic wave in polar coordinates. In Mathmatica this isn't a difficult thing to do but my lack of experience with Matlab is posing as an issue. My Modern Physics instructor would like us to plot the following Normalized Spherical Harmonic functions. Any help would be appreciated. Please give specific details because I still don’t know many of the commands. Thanks!
>
> Here is the url for the functions. I simply scanned them in instead of manually typing them out:
> http://farm4.static.flickr.com/3361/3447815798_3c2b8b8067.jpg?v=0

One approach to you homework ...

1) create a grid of elevation and azimuth angles
help meshgrid

2) calculate the radius of the desired spherical harmonic points over the grid
help legendre

3) convert elevation, azimuth and radius to Cartesian
help sph2cart

4) produce a 3D surface plot
help surf


Ken

Subject: Plotting 3-d functions (Spherical Harmonics)

From: Chris

Date: 20 Apr, 2009 15:21:02

Message: 6 of 6

Thanks Ken I appreciate the help. It helped alot....

"Ken Garrard" <ken_garrardAT@ncsuDOT.edu> wrote in message <gsa3e0$79b$1@fred.mathworks.com>...
> "Christopher Hart" <chart47@hotmail.com> wrote in message <gs7h63$otc$1@fred.mathworks.com>...
> > So I've had little experience with Matlab and I'm finding it difficult to plot a 3-d Spherical harmonic wave in polar coordinates. In Mathmatica this isn't a difficult thing to do but my lack of experience with Matlab is posing as an issue. My Modern Physics instructor would like us to plot the following Normalized Spherical Harmonic functions. Any help would be appreciated. Please give specific details because I still don’t know many of the commands. Thanks!
> >
> > Here is the url for the functions. I simply scanned them in instead of manually typing them out:
> > http://farm4.static.flickr.com/3361/3447815798_3c2b8b8067.jpg?v=0
>
> One approach to you homework ...
>
> 1) create a grid of elevation and azimuth angles
> help meshgrid
>
> 2) calculate the radius of the desired spherical harmonic points over the grid
> help legendre
>
> 3) convert elevation, azimuth and radius to Cartesian
> help sph2cart
>
> 4) produce a 3D surface plot
> help surf
>
>
> Ken

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com