![]() ![]() The code generator performs static analysis of the generated C/C++ code and provides the metrics in the Static Code Metrics Report section of the HTML Code Generation Report. Embedded Coder® provides features for measuring the runtime memory footprint of the application in the form of a metric report when you generate embedded C/C++ code. For each prediction block that is not a MATLAB Function block:Ĭlose_system( "slexVandVPredictExample.slx")Ĭlose_system( "slexVandVPredictSILProfilingExample.slx") Measure Runtime Memory Usage Using Static Code Metrics ReportĪnother important measure for an embedded application deployed to low-power hardware is the amount of runtime memory required for running the application on target hardware. To enable granular execution profiling for each predict block, place the prediction blocks inside a subsystem. The software can insert measurement probes for an atomic subsystem only if you set the Function packaging field (on the Code Generation tab of the Block Parameters dialog box) to either Nonreusable function or Reusable function. To generate function execution data, you must insert measurement probes into the generated code. This example uses the default value x86–64 (Windows64).įor more information, see Create Execution-Time Profile for Generated Code (Embedded Coder). In the Hardware Implementation pane, select the type of hardware to use to implement the system represented by the model. This option helps reduce bandwidth usage for the communication channel between Simulink and the target application. In the Code Generation > Verification pane, under Code execution time profiling, select Metrics only from the Save options (Embedded Coder) list. The software also creates the executionProfile variable in the out variable ( Simulink.SimulationOutput object). In the Data Import/Export pane, under Save to workspace or file, select the Single simulation output check box and specify the variable name as out. The variable, an object of type, contains the execution time measurements. When you run the simulation, the software generates a variable with this name in the MATLAB base workspace. ![]() In the Workspace variable field, specify the variable name as executionProfile. This option allows you to analyze generated function code for the main model components. In the Code Generation > Verification pane, under Code execution time profiling, select the Measure task execution time check box.įor the function execution times, select Coarse (referenced models and subsystems only) from the Measure function execution times list. In the Simulink Editor, on the Modeling tab, click Model Settings. Open the Configuration Parameters dialog box. This function returns a table of model metrics, including the model accuracy as a percentage and the model size in KB. ![]() Test the models with the test data by using the helper function HelperMdlMetrics. MultiMdls = fitctree(xTrain,yTrain) Measure Model Accuracy and Size ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |