我使用MATLAB NE生成器来编译,我从C#调用DLL文件。在MATLAB code被证实在MATLAB工作,但调用的时候从C#则出现下列错误:
I am using matlab NE builder to compile a dll file which I call from C#. The matlab code is confirmed to work in matlab, but when called from c# the following error occurs:
类型的未处理的异常'System.Exception的'中发生 MWArray.dll
An unhandled exception of type 'System.Exception' occurred in MWArray.dll
信息:
... MWMCR :: EvaluateFunction错误...标指标必须要么 是真正的正整数或逻辑值。在=> KalmanFilter.m错误的 线108。
... MWMCR::EvaluateFunction error ... Subscript indices must either be real positive integers or logicals. Error in => KalmanFilter.m at line 108.
在这行是:
plot(data(:, 1), data(:, 2));
我已经证实,当达到线,可变数据具有大小为n 4,其中n> 50,为什么该语句应该变得有意义。
I have confirmed that when the line is reached, the variable data has size n by 4, with n > 50, why the statement is supposed to make sense.
任何人有这个经验吗? 在此先感谢
Anyone got any experience on this? Thanks in advance
据我所知,这个问题出现时,你,你函数名命名变量或为MATLAB函数(保留名称)。 确保这不会发生。
As far as I know, this issue arise when you name variables as you function names or as MatLAB functions (reserved names). Make sure this is not happening.