Running m file from simulink

8 vues (au cours des 30 derniers jours)
Pat
Pat le 2 Déc 2012
I have a mile in which i have to call from sinulink,the m file willl plot a graph ,please tell how to call m file from simulink without using from workspace block

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 2 Déc 2012
You can use callback in simulink, fellow thhese steps
  1. right click on your simulink model
  2. click on model properties
  3. click on callbacks
  4. click on stop fcn
  5. type your m filename

Plus de réponses (1)

Mohammad Ali Sharifian
Mohammad Ali Sharifian le 24 Mar 2024
If the m-file is just for plotting, I recommend pasting your m-file codes in: model properties>callbacks>stop fcn
This way when you run your simulink, the results will be plotted automatically.

Catégories

En savoir plus sur Interactive Model Editing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by