登录论坛

查看完整版本 : J2ME中MATLAB的interp1函数的实现


poster
2019-12-10, 20:41
我正在寻找实现interp1、1-D数据插值(表查找)的功能,可以在J2ME或JAVA的MATLAB中使用。链接在这里

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

J2ME或JAVA中是否有已经实现相同功能的库?如果没有,有人可以帮助我在J2ME或JAVA中实现interp1功能吗?



回答:

我只是发现如果在interp1函数的语法中将方法参数选择为'linear',则该线性插值方法为:interp1(x,y,xi,'linear')。这是在multigraph包中提供的LinearInterpolator类的interp(double x)方法中实现的。链接在下面

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

如果您下载软件包并打开文件LinearInterpolator.java,则可以找到代码。下载软件包的链接是

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



更多&回答... (https://stackoverflow.com/questions/2986650)