%0 Journal Article
%T C程序调用MATLAB算法的方法与实现
Method and Realization of Calling MATLAB Algorithm by C Program
%A 李靖宇
%A 刘阳
%A 马晓波
%J Computer Science and Application
%P 2652-2661
%@ 2161-881X
%D 2021
%I Hans Publishing
%R 10.12677/CSA.2021.1111269
%X
MATLAB是一款广泛应用于科学计算领域的数学计算软件,非常适合信号处理、算法研究、数据仿真等工作,但是因其代码必须运行在MATLAB环境下,而实际应用中常常需要脱离MATLAB环境,用其它软件来调用MATLAB代码,所以带来了混合编程的需要。本文针对实际项目需求,讨论了用C程序调用MATLAB代码的几种方法,经过实践,最终选择了MATLAB代码转C动态链接库作为本地调用方法,以及借助MATLAB Production Server及其C客户端作为远程调用方法,该结果已经被用于产品研发中,达到了预期的效果。
MATLAB is a mathematical calculation software widely used in the field of scientific computing, which is very suitable for signal processing, algorithm study, data simulation and other works. However, its code must run in MATLAB environment, but in practical application, it often needs to be divorced from MATLAB environment and use other software to call MATLAB code, which brings the need of mixed programming. According to the actual project requirements, this article discusses several methods of calling MATLAB code with C program. After practice, we finally choose MATLAB code to C dynamic link library as the local call method, and use MATLAB Production Server with its C client as the remote call method. The results have been used in product development and achieved the expected effect.
%K MATLAB,MATLAB Production Server,混合编程,C语言
MATLAB
%K MATLAB Production Server
%K Mix Programming
%K C
%U http://www.hanspub.org/journal/PaperInformation.aspx?PaperID=46396