Thanks a lot Luc. Sorry to ask again, but i am not sure. Which is the best
method to use for linear interpolation (which is used by interp1 of Matlab).
For example, if i am given two arrays x = {1,2,3,4,5}, which is the domain
and y={1,8,27,64,125}, which is the range(function is cube).Now, to find the
value of y for x= 1.22, i use the interp1 method in Matlab, and get the
answer as 2.54
ans = interp1(x,y,1.22) = 2.54. (but, the cube of 1.22 is 1.8158) . I need
to do this as Matlab's interp1 does. Any idea of how should i implement this
?
Regards
Srikanth Kannan
On Mon, Jun 7, 2010 at 15:11, Luc Maisonobe <Luc.Maisonobe@free.fr> wrote:
> Le 07/06/2010 20:39, Srikanth Kannan a écrit :
> > Hi,
> >
> > i am looking to implement the interp1, 1D data interpolation (table
> > lookup), function available in MATLAB in J2ME or JAVA. Here is the link
> of
> > what interp1 does
> >
> > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/interp1.html
> >
> > Is there any method in Apache CommonMath library which has already
> > implemented the same function ? If not can anybody help me in
> implementing
> > 'interp1' function in J2ME or JAVA ?
>
> There are several different interpolation methods in the
> org.apache.commons.math.analysis.interpolation package for univariate,
> bivariate, trivariate and multivariate functions.
>
> There are also curve fitting algorithms in the
> org.apache.commons.math.optimization.fitting package.
>
> Hope this helps,
> Luc
>
> >
> > Regards
> > Srikanth Kannan
> >
>
>
> 
> To unsubscribe, email: userunsubscribe@commons.apache.org
> For additional commands, email: userhelp@commons.apache.org
>
>
