Re: Approximating the function from its plot
- To: mathgroup at smc.vnet.net
- Subject: [mg56509] Re: Approximating the function from its plot
- From: "Frank Iannarilli" <frankeye at cox.net>
- Date: Tue, 26 Apr 2005 23:00:18 -0400 (EDT)
- References: <d3o0dm$bn5$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I think this may be what you're looking for -- courtesy of some
years-ago poster:
"Although Plot[ (AppendTo[samples,{x,f[x]}]; f[x]), {x,a,b}] gives a
list of
the sample points used by Plot, a much simpler way to get the same
list,
properly ordered, is to take part [[1,1,1,1]] of the --graphics--
output of
Plot. E.g., Plot[...][[1,1,1,1]] or P = Plot[...]; P[[1,1,1,1]].
--Nelson M. Blachman
Palo Alto, Calif.
That is, this trick allows you to employ Plot[] on some function to get
an adaptively sampled set of points, which you can in turn use in
FunctionInterpolation[] etc. You can play with Plot[]'s options to
increase the sampling density/sampling behavior.