Re: Interpolating function
- To: mathgroup at smc.vnet.net
- Subject: [mg49186] Re: Interpolating function
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 6 Jul 2004 03:34:43 -0400 (EDT)
- Organization: The University of Western Australia
- References: <ccb6cc$eq4$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <ccb6cc$eq4$1 at smc.vnet.net>, mathma18 at hotmail.com ("G.L.Narasimham") wrote: > ODE=0==y''[t]+(1-y[t])/y'[t]; > NDSolve[{ODE,y[1]==1,y'[1]==1},y,{t,-2,3}]; > y2[u_] = y[u] /. First[%]; > yd = Dt[y2[t],{t,1}]; ydd = Dt[y2[t],{t,2}]; > Plot[ {y2[t],y3[t],yd,ydd},{t, -2, 3 }]; > " Is it not possible to directly access > y'[t]and y''[t] plots without Dt? " Yes it is. Use Evaluate: ODE=0==y''[t]+(1-y[t])/y'[t]; nsol=NDSolve[{ODE,y[1]==1,y'[1]==1},y,{t,-2,3}]; Plot[ Evaluate[{y[t], y'[t], y''[t]}/.nsol],{t, -2, 3 }] Cheers, Paul -- Paul Abbott Phone: +61 8 9380 2734 School of Physics, M013 Fax: +61 8 9380 1014 The University of Western Australia (CRICOS Provider No 00126G) 35 Stirling Highway Crawley WA 6009 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul