Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4468 > unrolled thread
| Started by | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| First post | 2011-08-19 10:36 +0000 |
| Last post | 2011-08-19 10:36 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Inverse Interpolation DrMajorBob <btreat1@austin.rr.com> - 2011-08-19 10:36 +0000
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-08-19 10:36 +0000 |
| Subject | Re: Inverse Interpolation |
| Message-ID | <j2leav$ng0$1@smc.vnet.net> |
p = Plot[Cos@x, {x, -1, 1}, PlotPoints -> 1000, PlotRange -> All,
AxesLabel -> {"x", "F"}];
pts = Reverse /@ First@Cases[p, Line[x_] :> x, Infinity];
ListPlot@pts
or
Clear[f]
f[x_] := Sow@{Cos@x, x}
pts = First@
Last@Reap@
Plot[f@x, {x, -1, 1}, PlotPoints -> 1000, PlotRange -> All,
AxesLabel -> {"x", "F"}];
ListPlot@pts
Bobby
On Thu, 18 Aug 2011 02:22:52 -0500, WetBlanket <wyvern864@gmail.com> wrote:
> Previously, the following code could be used to use the Plot functions
> algorithm to select point at which to evaluate a function to assist in
> obtaining a good numerical interpolation. In Version 8 this code does
> not seem to work ( at least for me). Can someone assist me by showing
> how this task is best accomplished in Version 8. I use the Cos
> function in this example for simplicity. Clearly, numerical
> interpolation is not needed to obtain an inverse for the Cos.
>
> list={};
> F = Cos[x];
>
> Plot[ ( ss=F; AppendTo[list, {ss,x}]; ss), {x,-1,1}, PlotPoints-
>> 1000,
> PlotRange->All, AxesLabel->{"x","F"}]
>
> Thanks for the help.
>
>
--
DrMajorBob@yahoo.com
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web