摘要
当使用MATLAB进行大规模数据处理时,一个工程中包含了多个程序,而且各程序需交叉调用多个子程序,这将导致程序执行效率低下。基于VC与MATLAB的自编头文件的CMEX混合编程可以有效解决这一问题。该方法在C/C++中自编一个头文件,声明需要用到的所有算法实现函数,并在另外的程序中编写这些函数的代码,通过mex Function接口函数实现VC与MATLAB混合编程。
For large-scale data processing in MATLAB, multiple programs exist in a project and each program needs to cross-call multiple subprograms,so the execution efficiency of the program is low.The C-MEX mixed progrmming method based on VC and MATLAB can be used to deal be with this problem very well.In this method,by writting a self-compiled header file to declare all the al- gorithm implementation functions whose codes can be written in other programs, and using mexFunction as a interface function, mixed programmincl of VC and MATLAB can be realized.
出处
《机械制造与自动化》
2015年第2期101-102,共2页
Machine Building & Automation