Resolved. Had to uninstall every bit of mathworks software from system, delete any file or folder with the word matlab in it and reinstall just the dll library.
Fitlm function doesn't work when compiled on new computer
조회 수: 15 (최근 30일)
이전 댓글 표시
My function works in Matlab and when compiled on one computer, but not a new one that I just set up with the exact same installed files, dependencies and references. This is the error it give me when I try to run the function in VS 2013, again this all works just fine on another computer with the exact same files installed:
An unhandled exception of type 'System.Exception' occurred in MWArray.dll
Additional information:
... MWMCR::EvaluateFunction error ...
Undefined variable "internal" or class "internal.stats.parseArgs".
Error in => RegressionTrainR2.m at line 5.
... Matlab M-code Stack Trace ...
at
file C:\Users\instadat\AppData\Local\Temp\2\instadat\mcrCache8.3\MathFu1\toolbox\stats\classreg\@LinearModel\LinearModel.m, name LinearModel.fit, line 849.
at
file C:\Users\instadat\AppData\Local\Temp\2\instadat\mcrCache8.3\MathFu1\toolbox\stats\classreg\fitlm.m, name fitlm, line 117.
at
file C:\Users\instadat\AppData\Local\Temp\2\instadat\mcrCache8.3\MathFu1\MathFunction\RegressionTrainR2.m, name RegressionTrainR2, line 5.
답변 (1개)
Tushar Sinha
2015년 11월 6일
Hi Sean,
Which MATLAB version did you compile your code with? It could be possible that the version and bitness of MCR is not matching with the version of Matlab Compiler used to create the application.
Another reason could be that the .NET dll is compiled with 64-bit MATLAB and in order to call the 64-bit .NET assembly DLL properly, the C# application in Visual Studio needs to be compiled in 64-bit as well. It is possible that in your Visual Studio project, you haven't changed the Solution Platform from "Any CPU" to "x64".
This article on StackOverflow contains detailed steps on how to change the solution platform to x64:
Thanks,
Tushar
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!