simulink and m file connection
Afficher commentaires plus anciens
i have genetic algorithm written in m file and i want to run simulink from m file then read from simulink to m file the problem here is that i don't know how to read this value before the genetic algorithm running
2 commentaires
Azzi Abdelmalek
le 22 Mar 2013
How result in m-file is used in Simulink?
mado
le 22 Mar 2013
Réponses (4)
Azzi Abdelmalek
le 22 Mar 2013
Modifié(e) : Azzi Abdelmalek
le 22 Mar 2013
1 vote
In simulink model use from workspace block to read data from workspace and to workspace block to export data to workspace
6 commentaires
mado
le 22 Mar 2013
Azzi Abdelmalek
le 22 Mar 2013
Modifié(e) : Azzi Abdelmalek
le 22 Mar 2013
Then Run your simulink model using to workspace block.
mado
le 22 Mar 2013
Azzi Abdelmalek
le 22 Mar 2013
This is not clear, can you explain ?
Azzi Abdelmalek
le 22 Mar 2013
Modifié(e) : Azzi Abdelmalek
le 22 Mar 2013
Jason Ghidella
le 25 Mar 2013
1 vote
What you need to do is use set_param end to set the values of Simulink parameters from the GA objective function, and have an outport on the signal you want to read in the GA onjective function. Then you run the Simulink model using the sim function, and then look at the simulation output to get the value.
This video shows how to do this:
mado
le 22 Mar 2013
0 votes
Ramya
le 6 Oct 2016
0 votes
can anyone tell me how to use the optimised values from the m file in simulink?
Catégories
En savoir plus sur Prepare Model Inputs and Outputs dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!