Setting initial condition of simulink integrator through code
20 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to cchange the initial condition of an integrator in Simulink by using Matlab code. I am using the following lines:
init_cond_integrator=[pi/3;0];
set_param('ClosedLoop_PID_MRFT_with_actuator/Manipulator Dynamics/Integrator1','InitialCondition',num2str(init_cond_integrator));
It gives the following error:
'ClosedLoop_PID_MRFT_with_actuator/Manipulator Dynamics/Integrator1' has unapplied changes. Please apply or cancel these changes before running the simulation.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/334932/image.png)
Any help will be highly appreciated.
Thanks!
0 件のコメント
回答 (1 件)
Fangjun Jiang
2020 年 7 月 21 日
The error message says you have the dialog window open and changes have not been applied. Click apply or Ok and then proceed.
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!