hi all, I need a func from scipy or other Python free software that provides quickly 1-variable interpolation of some funcs (I mean vectoriezed form) by 2nd-order splines. for example, I have (x from R) func1(x) = sin(x) func2(x) = cos(x) func3(x) = x^2 + x + 2*atan(x) (the number of the funcs may be very great, up to ~ 1000) So I have several points x = 0.1, 0.2, 0.3, 0.4 and I want to obtain func1(x), func2(x), func3(x) values from any point within the [0.1; 0.4] region. Also, it would be very nice if 1) the interpolation function would provide a value outside the region, interpolated by linear or quadratic or any other way; 2) I have possibility to do binary insert of new points. I.e., initially I have values of func1, func2, func3 in x=0.1 and x=0.3. Then I got values in x=0.4. Then - in x = 0.2, etc, etc . I know that sorted x-arrays allow to obtain interpolated values more quickly, like interp1() vs interp() in MATLAB. Can I somewhow take advantages in my case? Thank you in advance, Dmitrey.
I meant every time that I've got a func[i](x) spline estimations, for example in x=0.2, I calculate exact values func[i](x) in the point x=0.2, and then migrate to do spline estimations in next point. dmitrey wrote:
hi all, I need a func from scipy or other Python free software that provides quickly 1-variable interpolation of some funcs (I mean vectoriezed form) by 2nd-order splines. for example, I have (x from R) func1(x) = sin(x) func2(x) = cos(x) func3(x) = x^2 + x + 2*atan(x) (the number of the funcs may be very great, up to ~ 1000)
So I have several points x = 0.1, 0.2, 0.3, 0.4 and I want to obtain func1(x), func2(x), func3(x) values from any point within the [0.1; 0.4] region. Also, it would be very nice if 1) the interpolation function would provide a value outside the region, interpolated by linear or quadratic or any other way; 2) I have possibility to do binary insert of new points. I.e., initially I have values of func1, func2, func3 in x=0.1 and x=0.3. Then I got values in x=0.4. Then - in x = 0.2, etc, etc . I know that sorted x-arrays allow to obtain interpolated values more quickly, like interp1() vs interp() in MATLAB. Can I somewhow take advantages in my case?
Thank you in advance, Dmitrey. _______________________________________________ SciPy-user mailing list SciPy-user@scipy.org http://projects.scipy.org/mailman/listinfo/scipy-user
participants (1)
-
dmitrey