forum.alglib.net http://forum.alglib.net/ |
|
output of results of interpolation in delphi http://forum.alglib.net/viewtopic.php?f=2&t=307 |
Page 1 of 1 |
Author: | ballard [ Mon Feb 21, 2011 1:57 pm ] |
Post subject: | output of results of interpolation in delphi |
Hello, tell me please, how to output result of interpolation into two arrays or on the TSeries? I have such code: Code: var: ... in_x_array: TReal1DArray; //input value of X from my signal in_y_array: TReal1DArray; //input value of Y from my signal out_x_array: TReal1DArray; //output value of X from interpolated signal out_y_array: TReal1DArray; //output value of Y from interpolated signal out_interp_array: TReal2DArray; //output value from unpack S: Spline1DInterpolant; N: AlglibInteger; //count of points for result of interpolation(?) ... begin N:= 16384; Spline1DBuildLinear(in_x_array, in_y_array, N, S); SetLength(out_interp_arr,0,0); SetLength(out_interp_arr_x,0); SetLength(out_interp_arr_y,0); for m := 0 to N - 1 do begin SetLength(out_interp_array,m+1,2); SetLength(out_x_array,m+1); SetLength(out_y_array,m+1); Spline1DUnpack(S,N,out_interp_array); out_x_array[m]:=out_interp_array[m,1]; out_y_array[m]:=out_interp_array[m,2]; Form1.Series1.AddXY(out_x_array[m], out_y_array[m]); end; ... i'm doing right? how to output data to two 1D arrays through spline1dcalc subroutine? Thank you! |
Author: | Sergey.Bochkanov [ Tue Feb 22, 2011 9:39 am ] |
Post subject: | Re: output of results of interpolation in delphi |
You can't "output result into two arrays". You can calculate value of the interpolant with spline1dcalc() at the nodes stored at X array and output these values to Y array, but you will have one output array, not two. |
Author: | ballard [ Tue Feb 22, 2011 1:45 pm ] |
Post subject: | Re: output of results of interpolation in delphi |
Thank you, for your reply. I have sorted out. Thanks for great Lib! |
Page 1 of 1 | All times are UTC |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |