Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: plotting troubles
Date: Wed, 23 Sep 2009 02:18:02 +0000 (UTC)
Organization: Clemson University
Lines: 15
Message-ID: <h9c0gq$9n$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1253672282 311 172.30.248.37 (23 Sep 2009 02:18:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 23 Sep 2009 02:18:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2000289
Xref: news.mathworks.com comp.soft-sys.matlab:572223


I'm trying to take a 2D plot and rotate it about an axis to make it a 3D plot. I have used

plot(x,((BESSELJ(0,x)).^2).*((sin(pi*x)).^2),'c+-');

and am trying to rotate this about the x-axis so that is makes a 3D image of it. I have tried a 3D approach using

x = (BesselJ(0,(x.^2+y.^2).^(1/2))).^2.*(sin(pi*t)).^2;
y = (BesselJ(0,(x.^2+y.^2).^(1/2))).^2.*(sin(pi*t)).^2;
z = t;
plot3(x, y, z); 

but this gives me a bunch of screwy lines that does not at all look like what I want/need. Any help/suggestions?


~Josh