Effacer les filtres
Effacer les filtres

How to run simulink and m-file simulataneouly?

1 vue (au cours des 30 derniers jours)
Harinee Kannan
Harinee Kannan le 11 Avr 2017
Commenté : Harinee Kannan le 14 Avr 2017
I have been trying to get data from simulink and use it in m-file but since the size of the simulink output is 1000001x1 i am not able to process the data effectively. So,is there a way to prpocess the data from simulink during simulation it self like an online process. What are the procedures or functions to be used?

Réponse acceptée

Sebastian Castro
Sebastian Castro le 11 Avr 2017
Looks like it would be easier to process the data in Simulink by calling the MATLAB code from the model.
The typical way of doing this is by taking your existing function and calling it in a MATLAB Function block ( See example ).
Note that if your MATLAB file does things that are not supported for code generation, like plotting, user input, certain functions, you will have to either change your code or tell Simulink to run it using the MATLAB interpreter ( See documentation ). This is fine so long as you're staying within MATLAB/Simulink and do not need to generate code from your model.
- Sebastian

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Functions 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