我已尝试使用file.m
调用函数MLApp
。现在我想使用Matlab file.fis
中的命令调用Evalfis
。如何使用file.fis
调用MLapp
?
这是我以前尝试过的代码:
MLApp.MLApp matlab = new MLApp.MLApp();
// Change to the directory where the function is located
matlab.Execute(@"cd C:\Users\Administrator\Documents\MATLAB");
// Define the output
object result = null;
// Call the MATLAB function myfunc
matlab.Feval("multiplication", 1, out result, 3, 5);
// Display result
object[] res = result as object[];
MessageBox.Show(Convert.ToString(res[0]));