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.




相關書籍

Beyond the Basic Stuff with Python: Best Practices for Writing Clean Code

作者 Sweigart Al

2019-04-07

AI 手機 APP、智慧硬體專案實作|使用 TensorFlow Lite (iOS/Android/RPi適用) (Intelligent Mobile Projects with TensorFlow: Build 10+ Artificial Intelligence apps using TensorFlow Mobile and Lite for iOS, Android, and Raspberry Pi)

作者 Jeff Tang CAVEDU 教育團隊 曾吉弘 蔡雨錡 譯

2019-04-07

Math for Deep Learning: What You Need to Know to Understand Neural Networks

作者 Kneusel Ronald T.

2019-04-07