Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Plotting 3-d functions (Spherical Harmonics)
Date: Fri, 17 Apr 2009 14:24:01 +0000 (UTC)
Organization: North Carolina State University
Lines: 22
Message-ID: <gsa3e0$79b$1@fred.mathworks.com>
References: <gs7h63$otc$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239978241 7467 172.30.248.38 (17 Apr 2009 14:24:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 17 Apr 2009 14:24:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 216874
Xref: news.mathworks.com comp.soft-sys.matlab:533528


"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&#8217;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