摘要
简要介绍Matlab和Fortran各自的优缺点,详细阐述Matlab调用Fortran生成的动态链接库实现混合编程的两种方法。以高斯约当列主元素法求逆为例,从计算时间、精度等方面详细比较了同一算法在多种实现方式下的执行情况。计算结果表明:基于动态链接库的混合编程方法能充分利用现有软件包,结合Fortran计算效率高、Matlab矩阵计算及图形处理功能强的优点,符合当前科学工程计算程序设计的发展方向。
The advantages and disadvantages of Matlab and Fortran is briefly introduced in this article.And two methods of mixed language programming through calling Fortran dynamic link library from Matlab are discussed in detail.Take Gauss-Jordan elimination with partial pivoting for example,the computational results of the same algorithm under a variety of different implementation ways are carefully compared in terms of accuracy and computational time.The result indicatesthat,mixed language programming via dynamic link library can make full of existing packages,combine high efficiency of Fortran with powerful matrix computation and figure drawing and compiling functions of Matlab,thus conforming to the current development direction of programming in scientific and engineering computing.
出处
《计算机工程与应用》
CSCD
北大核心
2011年第31期1-3,23,共4页
Computer Engineering and Applications
基金
国家高技术研究发展计划(863)(No.2007AA06Z134)
国家重点基础研究发展规划(973)(No.2011CB606306)
中南大学自由探索计划(No.2011QNZT102)
中南大学博士后科学基金~~