我试着通过这样做来使用Matlab语言中的org.apache:
javaaddpath('~/.m2/repository/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar');
import org.apache.commons.math3.stat.correlation.*
c = org.apache.commons.math3.stat.correlation.KendallsCorrelation();我得到以下错误:
Undefined variable "org" or class "org.apache.commons.math3.stat.correlation.KendallsCorrelation"我该如何修复它?
发布于 2014-06-10 21:41:47
KendallsCorrelation类仅在数学版本3.3中存在,而我正在尝试使用版本3.2。下面的代码可以工作:
javaaddpath('~/matlab/jars/commons-math3-3.3/commons-math3-3.3.jar');
import org.apache.commons.math3.stat.correlation.*
c = org.apache.commons.math3.stat.correlation.KendallsCorrelation();
c.correlation([4 2 0], [3 2 1])https://stackoverflow.com/questions/24142087
复制相似问题