필터 지우기
필터 지우기

how to automatically configure the sim parameter

조회 수: 1 (최근 30일)
wenchao zhang
wenchao zhang 2023년 7월 7일
댓글: wenchao zhang 2023년 7월 8일
when i run the following command in command window, matlab version 2019a
sim('untitled','StartTime','0.0','StopTime','20.0','SolverType','Fixed-step','FixedStep','0.5');
the result shows the model simulation parater not changed, any one knows what's the reason, and how to solve it.

채택된 답변

Nitya Patel
Nitya Patel 2023년 7월 7일
You can use the set_param function to set these parameters before running the sim function. Something like below:
set_param('model_name', 'SolverType','Fixed-step');
sim('model_name');
You can set all the parameters individually and run sim at the end.
Documentation:
  댓글 수: 3
Nitya Patel
Nitya Patel 2023년 7월 7일
You can use the save_system function to save the model after making changes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by