forum.alglib.net

ALGLIB forum
It is currently Sat Apr 27, 2024 11:47 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: output of results of interpolation in delphi
PostPosted: Mon Feb 21, 2011 1:57 pm 
Offline

Joined: Mon Feb 21, 2011 1:19 pm
Posts: 2
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!


Top
 Profile  
 
 Post subject: Re: output of results of interpolation in delphi
PostPosted: Tue Feb 22, 2011 9:39 am 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 906
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.


Top
 Profile  
 
 Post subject: Re: output of results of interpolation in delphi
PostPosted: Tue Feb 22, 2011 1:45 pm 
Offline

Joined: Mon Feb 21, 2011 1:19 pm
Posts: 2
Thank you, for your reply. I have sorted out. Thanks for great Lib!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 257 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group