필터 지우기
필터 지우기

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

조회 수: 5 (최근 30일)
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

채택된 답변

Aishwarya Shukla
Aishwarya Shukla 2023년 3월 30일
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by