필터 지우기
필터 지우기

Fitlm function doesn't work when compiled on new computer

조회 수: 11 (최근 30일)
Sean Hannley
Sean Hannley 2015년 11월 4일
댓글: Sean Hannley 2015년 11월 9일
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
Sean Hannley
Sean Hannley 2015년 11월 9일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Tushar Sinha
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
  댓글 수: 1
Sean Hannley
Sean Hannley 2015년 11월 9일
I've had that problem before and this time it was different. I've resolved the situation. Comment on how above.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by