필터 지우기
필터 지우기

simulink and m file connection

조회 수: 1 (최근 30일)
mado
mado 2013년 3월 22일
답변: Ramya 2016년 10월 6일
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
Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 22일
How result in m-file is used in Simulink?
mado
mado 2013년 3월 22일
the result of m file will be used in simulink after m file finished its iteration

댓글을 달려면 로그인하십시오.

답변 (4개)

Azzi Abdelmalek
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
  댓글 수: 6
Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 22일
편집: Azzi Abdelmalek 2013년 3월 22일
Ok then use Interpreted Matlab function block or Matlab function block (for code generation)
mado
mado 2013년 3월 22일
편집: mado 2013년 3월 22일
why ?could you explain my code is colmplex and it contain calling function

댓글을 달려면 로그인하십시오.


Jason Ghidella
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:

mado
mado 2013년 3월 22일
for example if i used to workspace and i ran simulink the data won't be sent to workspace untill the simulink stopped

Ramya
Ramya 2016년 10월 6일
can anyone tell me how to use the optimised values from the m file in simulink?

카테고리

Help CenterFile Exchange에서 Signal Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by