Re: How to get data from solvin' numerically differential equation?
- To: mathgroup at smc.vnet.net
- Subject: [mg104155] Re: How to get data from solvin' numerically differential equation?
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Wed, 21 Oct 2009 06:30:38 -0400 (EDT)
- References: <hbjtju$5su$1@smc.vnet.net>
"?????? ?????????" <shalm89 at gmail.com> wrote in message news:hbjtju$5su$1 at smc.vnet.net... > Hi, > Mathematica solves numerically differential equation and makes > interpolation. I can plot this interpolating function. Can I save all > the points in a file or somehow get this data? > Best regards, Mikhail Shalaginov. > sol = First[NDSolve[{Derivative[1][y][t] == t,y[0] == 1}, y, {t, 0, 3}]]; data = Table[{t, y[t] /. sol},{t, 0, 3, 0.1}]; Now you can save this data to a file, plot it, etc... Export["data.txt", data] ListPlot[data, Joined -> True] --Nasser