MATLAB and Simulink Code Generation

MATLAB and Simulink Code Generation

作者: Marquez F.
出版社: Independently Published
出版在: 2019-04-07
ISBN-13: 9781093112306
ISBN-10: 1093112301
裝訂格式: Quality Paper - also called trade paper
總頁數: 406 頁





內容描述


Generating code from MATLAB algorithms for desktop and embedded systems allows you to perform your software design, implementation, and testing completely within the MATLAB workspace. You can: -Verify that your algorithms are suitable for code generation-Generate efficient readable, and compact C/C++ code automatically, which eliminates the need to manually translate your MATLAB algorithms and minimizes the risk of introducing errors in the code.-Modify your design in MATLAB code to take into account the specific requirements of desktop and embedded applications, such as data type management, memory use, and speed.-Test the generated code and easily verify that your modified algorithms are functionally equivalent to your original MATLAB algorithms.-Generate MEX functions to: -Accelerate MATLAB algorithms in certain applications.-Speed up fixed-poin MATLAB code.-Generate hardware description language (HDL) from MATLAB code.. To generate C/C++ or MEX code from MATLAB algorithms, you must install the followingsoftware: -MATLAB Coder product-C/C++ compilerWhen writing MATLAB code that you want to convert into efficient standalone C/C++code, you must consider the following: -Data types C and C++ use static typing. To determine the types of your variables before use, MATLAB Coder requires a complete assignment to each variable.-Array sizing Variable-size arrays and matrices are supported for code generation. You can define inputs, outputs, and local variables in MATLAB functions to represent data that varies in size at run time.-MemoryYou can choose whether the generated code uses static or dynamic memory allocation.With dynamic memory allocation, you potentially use less memory at the expense of time to manage the memory. With static memory, you get better speed, but with higher memory usage. Most MATLAB code takes advantage of the dynamic sizing features in MATLAB, therefore dynamic memory allocation typically enables you to generate code from existing MATLAB code without modifying it much. Dynamic memory allocation also allows some programs to compile even when upper bounds cannot be found.Static allocation reduces the memory footprint of the generated code, and therefore issuitable for applications where there is a limited amount of available memory, such asembedded applications.




相關書籍

R in a Nutshell, 2/e (Paperback)

作者 Joseph Adler

2019-04-07

Excel 2016 統計分析實務 -- 市場調查與資料分析 ( 範例適用Excel 2016~2010,附光碟)

作者 楊世瑩

2019-04-07

生物群智計算與機器學習

作者 朱雲龍 陳瀚寧 申海 張浩

2019-04-07