MATLAB Answers

How to change the value in edit field and Simulink model constant at the same time in the app designer?

조회 수: 4(최근 30일)
Elena Pupysheva
Elena Pupysheva 2021년 5월 9일
답변: Vimal Rathod 2021년 6월 22일
Hi!
I have an existing simulink model of chemical process, I want to create an app, where I can change the input constants to get results in plots and so on. The problem is that I haven't found any info how to connect edit field (numeric) to simulink constant.
Thanks for help!

답변(1개)

Vimal Rathod
Vimal Rathod 2021년 6월 22일
Hi,
You could use the "ValueChangedFcn" callback to create a callback for the editfield in the app. Then in the callback code you could access the simulink model's block data and change it during its execution.
Refer to the following link to know how to change the block's inputs or parameters during execution:

Community Treasure Hunt

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

Start Hunting!

Translated by