Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7791 > unrolled thread

how can one use mathematica get the approximate derivative of {x,y} data points?

Started by"Michael B. Heaney" <mheaney@alum.mit.edu>
First post2012-01-14 07:55 +0000
Last post2012-01-14 22:09 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  how can one use mathematica get the approximate derivative of {x,y} data points? "Michael B. Heaney" <mheaney@alum.mit.edu> - 2012-01-14 07:55 +0000
    Re: how can one use mathematica get the approximate derivative of {x,y} data points? Peter Breitfeld <phbrf@t-online.de> - 2012-01-14 22:09 +0000

#7791 — how can one use mathematica get the approximate derivative of {x,y} data points?

From"Michael B. Heaney" <mheaney@alum.mit.edu>
Date2012-01-14 07:55 +0000
Subjecthow can one use mathematica get the approximate derivative of {x,y} data points?
Message-ID<jercda$19h$1@smc.vnet.net>
Hi,

I have a set of {x,y} data points:

 {{0.03512, -0.5}, {0.0351181, -0.499}, ... {-0.113972, 0.699}, {-0.115072,
0.7}}

These data points look like a function y=f(x) when plotted on the x-y axes.
However, I do not know what the function f(x) is. But I need to get the
approximate derivative df/dx, as another set of data points. How can one
use Mathematica to do this?

Thanks,

Michael

--

[toc] | [next] | [standalone]


#7815

FromPeter Breitfeld <phbrf@t-online.de>
Date2012-01-14 22:09 +0000
Message-ID<jesuet$cf0$1@smc.vnet.net>
In reply to#7791
"Michael B. Heaney" wrote:

> Hi,
>
> I have a set of {x,y} data points:
>
>  {{0.03512, -0.5}, {0.0351181, -0.499}, ... {-0.113972, 0.699}, {-0.115072,
> 0.7}}
>
> These data points look like a function y=f(x) when plotted on the x-y axes.
> However, I do not know what the function f(x) is. But I need to get the
> approximate derivative df/dx, as another set of data points. How can one
> use Mathematica to do this?
>
> Thanks,
>
> Michael
>
> --

You can try Interpolation.

fun[x_]:=x^2Cos[x]

These will give approximate data for this function:

data=Table[{x,fun[x]+RandomReal[{0,0.25}]},{x,0,1,0.5}]

iF=Interpolation[data]

Derivative:

iF'[3]

Plot[{iF[x],iF'[x]},{x,0,5}]


-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web