Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: 3-D to 2-D slice revisited

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14246] Re: 3-D to 2-D slice revisited
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Mon, 12 Oct 1998 13:51:31 -0400
  • Organization: University of Western Australia
  • References: <6vf3pc$dd4@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Michael Mihalik wrote:
 
> I posted a message on here a week or so ago, about taking a slice of a
> 3-D graph, and then taking only one slice of it and looking at it in
> 2-D.  I received some replies, but i don't think that they understood
> the question, so I will copy down exactly what I have entered
 
 soln = NDSolve[{D[y[x,t],t]== D[y[x,t],x,x]*0.01 - D[y[x,t],x],
 y[x,0]==If[x>0,0,1], y[0,t]==1,Derivative[1,0][y][1,t]==0} , y,
 {x,0,1}, {t,0,2}]
 
 Plot3D[Evaluate[y[x,t]/.First[soln]], {x,0,1}, {t,0,2}, 	
	PlotPoints -> 30]
 
> I want to take the graph generated from the above partial differential
> equation and view the y-z slice at x = 1.

Do you mean the y-t slice at x = 1? If so,   

 Plot[Evaluate[y[1,t]/.First[soln]], {t,0,2}, PlotPoints -> 30]

>P.S., I've already tried viewing the 3-D plot from just the right 
>angle, but it is not good enough to interpolate a line and extract 
>certain parameters from it.  

Note that the output of NDSolve _is_ an interpolating function -- so
there should be no need to interpolate a line and extraction of
parameters from it should be straightforward.  For example, to find the
slope of the y[1,t] at t = 0.9 (i.e., for the y-t slice at x = 1), you
can use

  In[5]:= Derivative[0,1][y][1,0.9]/.First[soln]
  Out[5]= 2.6311

Cheers,
	Paul

____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia            Nedlands WA  6907       
mailto:paul at physics.uwa.edu.au  AUSTRALIA                       
http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: Solving simultaneous eqns
  • Next by Date: Re: Mouse is always a hand with Linux.
  • Previous by thread: Re: 3-D to 2-D slice revisited
  • Next by thread: Help w/ conversion of txt file to useable form for Mathematica