views:

138

answers:

1

Hi,

i am looking to implement the interp1, 1-D data interpolation (table lookup), function available in MATLAB in J2ME or JAVA. here is the link

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/interp1.html

Is there any library available in J2ME or JAVA which has already implemented the same function ? If not can anybody help me in implementing interp1 function in J2ME or JAVA ?

A: 

i just found out the method used for linear interpolation if 'linear' is selected for method parameter in the syntax of interp1 function, which is : interp1(x,y,xi,'linear'). This is implemented in the method interp(double x) of class LinearInterpolator which is present in multigraph package. the link is below

http://multigraph.sourceforge.net/multigraph/javadoc/multigraph/LinearInterpolator.html

if u download the package and open the file LinearInterpolator.java u can find the code. The link to download the package is

http://sourceforge.net/projects/multigraph/files/multigraph/

Jeeka