0
$\begingroup$

I''m not a mathematical guy at all. I have the points of a non-linear function and I would love to know if it's possible to find a way (an algorithm or whatever) to calculate the derivative of the function at each point.

Thanks in advance!

EDIT: The function could be something like the black line (it's the sensor data averaged and filtered)

enter image description here

  • 0
    @SoMoS,maybe you should use "The Steinhart-Hart equation" http://www.facstaff.bucknell.edu/mastascu/elessonshtml/Sensors/TempR.html2011-10-09

2 Answers 2

3

there is a so called "The Chain Rule" which helps to generate a very special function. this function will magically give you derivative of any point on your curve. but first, you must understand that your big function is a combination of many other child functions so you may have to learn how to decompose your wave into smaller ones.

i know it sounds strange but any nonlinear (distorted ) waveform contains many thousands of linear waveforms.these little guys live within your chaotic waveform. its because of them, your chaotic waveform exists. they feed it.they are called harmonics. thanks god harmonic is always linear. if you could extract all the harmonics from your waveform, they will give you their own functions. but before you dive into slope analysis you must recreate one big function which will combine all the harmonics and that gives you function of your chaotic waveform. im learning that right now sorry if i give non correct information i simply don't know myself; there is a special section in math for this. it's called fourier series. fourier series allows you to do exactly what i told you.

1

One way is to create the function that could generate your points in the form of F(X)=some expression depending on X.

There are different ways to generate such functions, for example the least square methods (already built in Excel for example).

One you know the function, you could calculate the derivative at any point assuming that the function is continuous at that point.

Given the points (1,1) , (1,8) , (1, 27) you can see that F(X)=X*X*X and its derivative is 3*X*X so the derivative at x=1 is 3*1*1.

The problem here is that since there are many methods to obtain the original function, there will be a derivative for each generated function that may or may not all yield the same result.

Edit There is another approach to calculate first derivative numerically without knowing the exact function - Please see: http://www.math.montana.edu/frankw/ccp/modeling/continuous/heatflow2/firstder.htm

  • 0
    @J.M. thanks for the hint. Very valid.2011-10-09