Java中调用MATLAB.m文件生成好的包时出现异常java.lang.NoClassDefFoundError: 5
packageweka.classifiers.myalgorithm;importcom.mathworks.toolbox.javabuilder.MWExcepti...
package weka.classifiers.myalgorithm;import com.mathworks.toolbox.javabuilder.MWException;import timeseries.regress_time_series;public class TestTimeSeries { /** * @param args */ public static void main(String[] args) throws MWException { regress_time_series rs = new regress_time_series(); try { double[][] getD = new double[][] { { 1, 3.878945921 }, { 2, 3.522376476 }, { 3, 3.569071412 }, { 4, 3.522676476 }, { 5, 3.559571412 }, { 6, 3.522376476 }, { 7, 3.559074412 }, { 8, 3.524376476 }, { 9, 3.559071422 }, { 28, 3.542576476 }, { 29, 3.559543412 } }; String figPath = "E:\\image";// /图像保存路径,特别注意,这个路径要用 float moveItemNum = 1;// 移动项数 float preDNum = 1; // 预测的个数 double[][] figSet = new double[][] { { 7 }, { 650 }, { 320 } }; String figName = "regress_time_series_figure.png"; // String figure_name=""; System.out.println(rs.regress_time_series(3, getD, moveItemNum, preDNum, figPath, figName, figSet)[0]); } catch (Exception ex) { ex.printStackTrace(); } }
} 展开
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询