我正在尝试在c#中使用以下matlab代码:
MLApp.MLApp matlab = new MLApp.MLApp();
matlab.Execute(@"cd 'F:\2dAutocorrelationFunction\New_folder'");
object result = null;
matlab.Feval("AutoCorrelation", 1, out result);
object[] res = result as object[];
和c#代码是:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
但是,当我执行代码时,我的程序在matlab.Feval()上抛出以下异常;
List<Long> alarmedTimeStamps=sensorDataDoubleDF.toJavaRDD().filter(filterAlarmNode).filter(filterAlarmInstances).map(row->row.getLong(2)).collect();
System.out.println("The type of collection is :"+alarmedTimeStamps.getClass().getTypeName());
ArrayList<Long> javaAlarmedTimeStamps=new ArrayList();
for(Long item:alarmedTimeStamps)
javaAlarmedTimeStamps.add(item);
//sort the TTS points
Collections.sort(javaAlarmedTimeStamps);
有人可以告诉我我做错了什么吗?以及如何解决它?