Azzera filtri
Azzera filtri

How to access model data of Hybrid electric vehicle model in reference application projects?

5 visualizzazioni (ultimi 30 giorni)
hello, I am using the Hybrid electric vehicle models built in Simulink . I want to access to the paramters' data that are used in running the models

Risposta accettata

Aishwarya Shukla
Aishwarya Shukla il 30 Mar 2023
Hello! To access the parameters' data used in running Simulink models, you can follow these steps:
  1. Open the Simulink model that you want to access the parameters for.
  2. In the Simulink Editor, locate the block whose parameters you want to access. Double-click on the block to open its dialog box.
  3. In the dialog box, you will see a Parameters tab. Click on it to view the parameters for that block.
  4. You can now view and edit the parameter values as needed. If you want to save the parameter values to a file for future reference, you can do so by selecting File > Save As and choosing a file format that works for you (e.g., MATLAB workspace or text file).
Alternatively, you can use the MATLAB command line to access and modify the parameter values. To do this, you can use the "get_param" and "set_param" functions, which allow you to get and set parameter values programmatically. For example:
% Get the value of a parameter named "myParam" in a block named "myBlock"
paramValue = get_param('myBlock', 'myParam');
% Set the value of the same parameter to a new value
set_param('myBlock', 'myParam', 'newParamValue');
I hope this helps! Let me know if you have any other questions.

Più risposte (0)

Categorie

Scopri di più su Programmatic Model Editing in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by