文件名称:Writing Fast MATLAB Code
文件大小:184KB
文件格式:PDF
更新时间:2012-04-22 11:48:11
matlab
MATLAB is a popular programming language for its simplicity and broad range of tools for topics like signal procesing, statistics, dierential equations, and of course, matrices. Users can easily add their own m-le functions for specic applications, further extending MATLAB's usefulnes. However,the MATLAB programming language is parsed{codeisinterpretedandtranslatedintocom- puter operations in realtime { where faster languages like C/C++ are compiled ahead of time into the computer'snativelanguage. Someadvantagestoparsinginrealtimearegreaterplatformindependence, robustnes, andeasierdebugging. (AlsonotethatMATLAB's\eval"functionhasnoC++equivalent.) The disadvantage of parsing in realtime is signicant los in sped, as wel as increased overhead and les low-level control. To compensate, MATLAB oers means to help sped up code. This article discuses these and other strategies to improving the sped of MATLAB code. The Proler tool Aray prealocation Vectorized computation