摘要
利用MATLAB进行算法的研究、仿真和实现,已经成为科研工作者的重要手段之一。在MATLAB上开发算法便捷、高效,但无法直接应用在其他平台,此时需要软件人员编码转换进行二次开发。如果某个算法同时应用在Windows和Linux这两个系统中,软件人员需要开发两个不同的软件,它们功能相同只是代码不同。这不仅增加了软件开发的工作量,同时也不利于后期维护。针对上述问题,提出了一种基于MATLAB快速开发跨平台算法软件的方法。首先,利用MATLAB开发算法的便捷性进行算法的调试与验证,简化接口函数;其次,使用MATLAB Coder生成独立于MATLAB的C/C++代码;然后,将生成的代码在不同平台下进行封装,生成该目标平台的动态链接库;最后,不同平台通过调用该平台下的动态链接库,实现了同一算法的跨平台软件开发。所提出的算法软件跨平台开发方法,已成功应用于多个实际项目。通过本方法,不仅缩短了软件的开发周期,提高了软件编程效率,减少了软件开发中的人为错误,同时方便了软件的后期维护。
Using MATLAB for developing, simulating and implementing algorithm software has become one of primary means for researchers. Although the algorithm developed on MATLAB is convenient and efficient, it cannot be directly applied to other platforms, it has to be under secondary development. If one algorithm is to be applied in both Windows and Linux systems, the software engineers need to coder two software, which are same functional but not in same form. That not only largely increases the workload, but also inconvenient to subsequent maintenance. To solve those problems, this paper formulates a method for rapid development of cross-platform algorithm software based on MATLAB. Firstly, algorithms are developed and validated in MATLAB for its convenience;Secondly, MATLAB Coder is used to generate C/C++, which is independent of MATLAB;Then generated code are packaged into corresponding platform dynamic link library in target platform;Finally, by calling interface functions is able to achieve the requirement of the same algorithm software running on different platforms. The method mentioned above has been successfully applied to some engineering projects. During the period of software development, the method not only shortens the software development cycle, improves the efficiency of programming, reduces the errors of human, but also facilitates software post-maintenance.
作者
周希娃
张国玉
李洋
胡继军
ZHOU Xiwa;ZHANG Guoyu;LI Yang;HU Jijun(Beijing Research Institute of Telemetry,Beijing 100076,China)
出处
《遥测遥控》
2022年第5期68-73,共6页
Journal of Telemetry,Tracking and Command