1
votes

I'm using MATLAB Builder NE to build some MATLAB functions into .NET assembly and invoke them from C#. Then I encountered this error:

-----------------------------------Error-------------------------------

... MWMCR::EvaluateFunction error ...

Undefined function 'mwltelibrary' for input arguments of type 'cell'.

Error in => Testfunction.m at line 62.

... Matlab M-code Stack Trace ...

at file C:\Users\Owner\AppData\Local\Temp\Owner\mcrCache8.3\Test\toolbox\lte\lte\lteTBS.m, name lteTBS, line 37.

at file C:\Users\Owner\AppData\Local\Temp\Owner\mcrCache8.3\Test\Testfunction.m, name Testfunction, line 62.

-----------------------------------END---------------------------------

In Testfunction.m line 62, that function invokes the function lteTBS from lteTBS.m which is provided by MathWork. Actually, this .m file is written by my colleague and I know nothing about Matlab. If I run this function in command window of Matlab (R2014a 32bit in Windows 8.1 pro 64bit), it works.

I have checked that machine and all followed components have been installed.

MATLAB, MATLAB Builder NE, MATLAB Compiler, Communications System Toolbox, DSP System Toolbox, LTE System Toolbox, Signal Processing Toolbox

Any help is highly appreciated.

1
In fact the only thing you need on the target machine is the MCR (MATLAB Compiler Runtime). Check the mccExcludedFiles.log file generated by the MATLAB Compiler to see if your function was included in the deployment to begin with.dee-see
Vache, Thanks. I have checked mccExcludedFiles.log. It's empty.qian
Hmm then since the error comes from within a toolbox function I'm afraid I have nothing else to suggest than to ask Mathworks support.dee-see

1 Answers

0
votes

Some Updates:

I have tried to invoke another LTE api and got this error: LTE System Toolbox does not support the deployed mode.

I also contacted the MathWorks technical supporter and he said LTE System Toolbox can not be deployed in this way.

Here is my workaround: run MATLAB application with some parameters using System.Diagnostics.Process.

If the MATLAB is not installed in the local machine, it has to send a request to the server with MATLAB installed.

You can find some useful information from this post in MathWorks forum.