simulink and m file connection
이전 댓글 표시
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
답변 (4개)
Azzi Abdelmalek
2013년 3월 22일
편집: Azzi Abdelmalek
2013년 3월 22일
1 개 추천
In simulink model use from workspace block to read data from workspace and to workspace block to export data to workspace
댓글 수: 6
mado
2013년 3월 22일
Azzi Abdelmalek
2013년 3월 22일
편집: Azzi Abdelmalek
2013년 3월 22일
Then Run your simulink model using to workspace block.
mado
2013년 3월 22일
Azzi Abdelmalek
2013년 3월 22일
This is not clear, can you explain ?
Azzi Abdelmalek
2013년 3월 22일
편집: Azzi Abdelmalek
2013년 3월 22일
Jason Ghidella
2013년 3월 25일
1 개 추천
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:
Ramya
2016년 10월 6일
0 개 추천
can anyone tell me how to use the optimised values from the m file in simulink?
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!