EvaluateFunction error .. fails with no error message

Hi there, Trying to make a call to a function in a MATLAB assembly built by MATLAB BUILDER NE ,for .Net, an exception is thrown without any messages :
MWMCR::EvaluateFunction error ...
at MathWorks.MATLAB.NET.Utility.MWMCR.EvaluateFunction(String functionName, Int32 numArgsOut, Int32 numArgsIn, MWArray[] argsIn)
at MathWorks.MATLAB.NET.Utility.MWMCR.EvaluateFunction(Int32 numArgsOut, String functionName, MWArray[] argsIn)
at ...
The function that is tried to call is a rather simple MATLAB function that calls another one.
The following peices of software has been installed: MATLAB R2009a (64 bit) Microsoft Visual Studio 2008
Any suggestion will be appreciated.

1 个评论

Are you sure there is no error message displayed after "MWMCR::EvaluateFunction error ..."? Typically the accompanying message gives us a hint to exactly why there was a failure in evaluation of the compiled function.
Also, do you add the other function (that is called from the main function) to "Additional/Other Files" in deploytool?

请先登录,再进行评论。

回答(1 个)

Hi Kaustubha Thanks for the comment. For you and other viewers' info: It was strange but, there was a line in one of functions : addpath(genpath(MainFolder)); I removed it, and added the 'MainFolder' folder path (and its subfolders), manually.
And it is solved now. No exception, No error.

1 个评论

Do you mean that you added the folder to "Additional/Other Files" in deploytool?
Note that this is the correct way to do it rather than using "addpath", because the compiled assembly only has access to the user-defined functions that have been added to the CTF archive.

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 Deploy to .NET Applications Using MWArray API 的更多信息

提问:

2011-5-26

Community Treasure Hunt

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

Start Hunting!

Translated by