can we interface simulink with matlab code?
Mostra commenti meno recenti
Is this possible to interface the simulink model output with matlab code?
Risposte (2)
Tamir Suliman
il 26 Feb 2018
Modificato: Walter Roberson
il 26 Feb 2018
1 voto
you can configure Model Callback Functions to call MATLAB code at specific times in the model lifetime. You can use PostLoadFcn to call something right after a model has been loaded, and InitFcn to call during model update, or right before simulation.
You can run MATLAB-file during simulation (as if it were one of the blocks) using the Interpreted MATLAB Function, but initial conditions are needed at the beginning of simulation, so using the InitFcn callback is a better place to do that.
ref
Walter Roberson
il 26 Feb 2018
0 voti
See the To Workspace and To File blocks, and see the sim() command. It is also possible to invoke MATLAB graphics from inside Simulink.
1 Commento
DhanaLakshmiR
il 2 Mar 2018
Modificato: DhanaLakshmiR
il 2 Mar 2018
Categorie
Scopri di più su Simulink Environment Customization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!