Thanks Luc, thanks for getting back so quickly, and will wait for your information tomorrow.
-sujit
On Mar 30, 2012, at 2:36 PM, Luc Maisonobe wrote:
>
>
>
> SUJIT PAL a écrit :
>
>> Hi,
>>
>> I have a (newbie) question about how to go about solving the problem
>> below with commons-math.
>>
>> 1) I have histogram data (equal x intervals) based off some
>> distribution.
>> 2) I need a way to calculate the second differential between two given
>> x points in the distribution.
>>
>> Here is what I think I should do:
>> 1) Feed the (x,y) values represented by the top of each histogram entry
>> within my x-range into a UnivariateRealInterpolator between ranges
>> (x1,y1) and (x2,y2).
>> 2) The interpolate method gives me back a PolynomialSplineFunction
>> (call if psf).
>> 3) I get the second differential UnivariateRealFunction (call it urf)
>> by calling psf.getPolynomialSplineDerivative().derivative()
>> 4) I compute the second derivative value as the difference of
>> urf.value(x2) - urf.value(x1)
>>
>> Does this sound like a reasonable/accurate approach? Any
>> suggestions/gotchas or pointers to better approaches?
>
> No, this is not an approach I would recommend. A much more straightforward
> way to compute this derivative is to apply a dedicated finite differences formula
> on three consecutive points. I'll give ou such a formula tomorrow (I am on a mobile
> device right now and it is difficult to write a complète mail...)
>
> Luc
>
>>
>> Thanks very much,
>>
>> Sujit
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org