simulink and m file connection
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (4)
Azzi Abdelmalek
am 22 Mär. 2013
Bearbeitet: Azzi Abdelmalek
am 22 Mär. 2013
In simulink model use from workspace block to read data from workspace and to workspace block to export data to workspace
Jason Ghidella
am 25 Mär. 2013
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:
0 Kommentare
Ramya
am 6 Okt. 2016
can anyone tell me how to use the optimised values from the m file in simulink?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Prepare Model Inputs and Outputs finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!