I've attached a simple java file that interpolates and prints functions
(results on second files)
I expected at least to have a continue function

Moreover I catched x and y values from wikipedia that gives this functions
for natural cubic spline with theese points
http://upload.wikimedia.org/math/9/a/7/9a712abc0f13501fd9ccbd1dae69789a.png

Thank you,
Nico


2013/8/22 Gilles <gil...@harfang.homelinux.org>

> On Thu, 22 Aug 2013 17:02:34 +0200, Nico Caprioli wrote:
>
>> Since I need a spline interpolation I used your library do calculate it
>> but
>> it seems it is not working good.
>>
>> If I understood javadoc i need two double[] arrays:
>> - double[] x: the absissa of every point
>> - double[] y: the ordinate/value of points in the same order of x
>>
>> Now after interpolation I try to print it through:
>> System.out.println(Arrays.**toString(interpolation.**getPolynomials()));
>> where interpolation is the PolynomialSplineFunction generated.
>>
>> It outputs some functions but only the first is correct, why?
>>
>> Thank you!
>>
>
> From the above information, it is hard to figure out what you did,
> what you expected and what you got.
> Please attach a minimal, but working, code example.
>
> Regards,
> Gilles
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> user-unsubscribe@commons.**apache.org<user-unsubscr...@commons.apache.org>
> For additional commands, e-mail: user-h...@commons.apache.org
>
>
0.9937235897435898 x - 0.15222358974358977 x^3
0.8415 + 0.5370528205128204 x - 0.4566707692307693 x^2 - 0.012582051282051218 
x^3
0.9093 - 0.4140348717948718 x - 0.494416923076923 x^2 + 0.1402517948717948 x^3
0.1411 - 0.9821133333333333 x - 0.0736615384615386 x^2 + 0.15787487179487186 x^3
-0.7568 - 0.6558117948717948 x + 0.399963076923077 x^2 + 0.053748717948717904 
x^3
-0.9589 + 0.30536051282051285 x + 0.5612092307692307 x^2 - 0.18706974358974357 
x^3
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to