Can i change Simulink block properties from the C code?

Hello, I have a Simulink model and an application written in C and I need to change some block properties using some GUI of an external app. Is this possible and if yes, which way should I search the solution?

2 Comments

How do you open the model from your C application? Do you start MATLAB as a COM Server or use the MATLAB Engine interface?
At this moment there is no matlab reference in the code, only the signal generation. I am new to this and don't know which way to start MATLAB, what would you advise?

Sign in to comment.

 Accepted Answer

You need to have MATLAB/Simulink installed on the machine that the application running, to achieve what you need. You can use either the MATLAB Com Interface (Windows only) or the MATLAB Engine Interface to start and control MATLAB from your C application. Expand 'MATLAB Functions' on this page to look at the list of Simulink-related MATLAB functions that you can then run via the interface to open/control your Simulink model. Essentially, you need to figure out all the MATLAB commands you want to run to achieve each Simulink task.

More Answers (0)

Categories

Find more on Simulink in Help Center and File Exchange

Products

Tags

Community Treasure Hunt

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

Start Hunting!