Page 1 of 1

Differentiate curve based on past time interval

Posted: Wed Sep 07, 2011 10:24 am
by bonus
Is there a way to differentiate a curve based on the past = previous time interval?

Code: Select all

y_j' = (y_j - y_j-1)/(x_j - x_j-1)
I'm working with non equally spaced rainfall time series, here in the form of the total rainfall depth:

Code: Select all

26-05-2011 17:28:19 0.1
26-05-2011 17:35:42 0.2
26-05-2011 20:27:53 0.3
26-05-2011 22:36:41 0.4
26-05-2011 22:39:16 0.5
26-05-2011 22:44:05 0.6
26-05-2011 22:51:35 0.7
26-05-2011 22:53:43 0.8
26-05-2011 22:56:56 0.9
26-05-2011 23:00:07 1.0
26-05-2011 23:02:31 1.1
26-05-2011 23:03:39 1.2
etc.
The rainfall intensity equals the slope of the rainfall depth in the past interval, whereas the "Differentiate a Curve" command is based on the central difference

Code: Select all

y_j' = (y_j+1 - y_j-1)/(x_j+1 - x_j-1)
which doesn't really fit.

Thank you!

Posted: Wed Sep 07, 2011 12:13 pm
by DPlotAdmin
There's no way to do that but it would of course be an easy addition. Thanks for the suggestion.

Posted: Thu Sep 29, 2011 9:44 am
by bonus
If this is indeed an easy addition, it would be great to get it in one of the next releases.
Thank you!

Posted: Thu Sep 29, 2011 10:38 am
by DPlotAdmin
It will be.

Posted: Sat Mar 17, 2012 7:10 pm
by raswaim
Is this feature restricted to only curves that have regular intervals? With the latest release I seem to only get the pop-up to choose the method if the data is regular. I differentiated a sample generated curve and got the popup, but after I remove a couple points from the curve I no longer get any options when I select the same curve to differentiate again.

Posted: Sat Mar 17, 2012 7:14 pm
by DPlotAdmin
Yes, but that is an error of omission on my part rather than a logical restriction. I'll fix this in the next release.