simulink and m file connection
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(4 个)
Azzi Abdelmalek
2013-3-22
编辑:Azzi Abdelmalek
2013-3-22
In simulink model use from workspace block to read data from workspace and to workspace block to export data to workspace
Jason Ghidella
2013-3-25
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 个评论
Ramya
2016-10-6
can anyone tell me how to use the optimised values from the m file in simulink?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!