大家須要在MATLAB中呼叫或使用dll檔案嗎
在目前的MATLAB6.5 SP1中已加入了這個應用介面
不過可能很多人由MathWorks上下載下來的安裝後都會有一點問題
目前分享的這個東西是更新版
下載後直接解壓縮就可以使用了
There are some limitations and restrictions that must be noted:
1) Currently, the MATLAB Interface to Shared Libraries is supported on Windows systems only. Windows shared library files have the file extension .dll.
2) Passing a void ** argument (that is, a pointer to a VOID pointer) to a function in a shared library is not supported in this release.
3) Passing a complex structure argument (that is, a structure constructed from other structures) to a shared library function is not supported in this release.
4) MATLAB does not currently support manipulation (e.g., addition, subtraction) of pointers returned by functions in a shared library.
help pdf檔的位置:
For more information on how to use MATLAB to load and call shared library functions, and for specifics on data conversion, consult the PDF documentation shipped with the files. It is automatically installed in the $MATLAB/toolbox/matlab/general directory (where $MATLAB is your root MATLAB directory). There are 3 documentation files: dll_interface_guide.pdf, dll_interface_reference.pdf, dll_interface_relnotes.pdf
Examples
This example calls functions from the libmx library to test the value stored in y:
warning off MATLAB:loadlibrary:typenotfound
hfile = [matlabroot '/extern/include/matrix.h'];
loadlibrary('libmx', hfile)
y = rand(4, 7, 2);
calllib('libmx', 'mxGetNumberOfElements', y)
ans =
56
calllib('libmx', 'mxGetClassID', y)
ans =
mxDOUBLE_CLASS
unloadlibrary libmx
希望能夠引起大家熱列的討論這個套件
附件
来源:http://www.simwe.com/cgi-bin/ut/topic_show.cgi?id=29664&h=1&bpg=3&age=-1