Re: Getting Coordinates from plot
- To: mathgroup at smc.vnet.net
- Subject: [mg32976] Re: Getting Coordinates from plot
- From: peter weijnitz <pewei at algonet.se>
- Date: Fri, 22 Feb 2002 01:49:04 -0500 (EST)
- Organization: Telenordia/Algonet
- References: <a5271k$27k$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
modify the last line to: p1=ParametricPlot[{ {xd[t], xdd[t]}, {xr[t], xrd[t]}}, {t, 1000, 1500}]; and then: p1[[1,1,1,1,1]] will be the coordinats of the first data set p1[[1,2,1,1,1]] the second PW Winston Garira wrote: > Hi, > > Can someone help me on this one. > I would like a list of coordinates so that I can analyze them further > and possibly import into a "prettier" graphing package. What should > I do when using the NDSolve function? > > I have tried the menu command: Input -> Get Graphics Coordinates. > This requires me to use Mod1 key which I don't have on my keyboard. > > How can I get coordinates of the plot from the following: > > Pends[init1_, init2_, time_, k_, {c_, w_, p_}] := > Module[{}, > pend = NDSolve[{ > x1''[t] + c x1'[t] + ((1 + p Cos[w t])) Sin[x1[t]] == k (x2[t] - x1[t]), > x2''[t] + c x2'[t] + ((1 + p Cos[w t])) Sin[x2[t]] == k (x1[t] - x2[t]), > x1[0] == init1[[1]], x1'[0] == init1[[2]], > x2[0] == init2[[1]], x2'[0] == init2[[2]]}, > {x1, x2}, {t, 0, time}, > MaxSteps -> 200000]; > xd[t_] := x1[t] /. pend[[1]]; > xdd[t_] :=x1'[t] /.pend[[1]]; > xr[t_] := x2[t] /. pend[[1]]; > xrd[t_] :=x2'[t] /.pend[[1]]; > ]; > c = 0.1; w = 2.0; p = 2.0; > Pends[{1.37, 0}, {-1.17, 0}, 5000, 0.0, {c, w, p}]; > ParametricPlot[{ {xd[t], xdd[t]}, {xr[t], xrd[t]}}, {t, 1000, 1500}]; > > > > Winston