2
所以我有一个m文件,我使用Matlab编译器在C dll窗体中编译。注意编译后的dll文件最初是一个名为'matFunction.m'的matlab文件。现在我想要从我的matlab代码运行这个DLL。 _I正在做以下在matlab中运行一个在dll中编译的m文件
loadlibrary compiledDLL.dll compiledDLL.h
calllib('compiledDLL','matfunction')
,但我得到的是
Error using calllib
Method not found
我也用
loadlibrary compiledDLL.dll compiledDLL.h
calllib('compiledDLL','matfunction.m')
的错误,但我得到了同样的错误。有人能告诉我我做错了什么,以及如何在我的matlab代码中运行这个DLL。
调用LoadLibrary是一个函数,不是吗?即'loadlibrary(dll,hfile)'?我可能是错的 –
http://www.mathworks.com/help/matlab/ref/loadlibrary.html –