how to link gui and simulink?

조회 수: 4 (최근 30일)
Antriksh
Antriksh 2011년 11월 4일
i am trying to transfer some of the test results from simulink to GUI,can you help me.....what am i suppose to do for that?

답변 (3개)

Sreeram Mohan
Sreeram Mohan 2011년 11월 7일
Hi Antriksh,
I have not digged deep into it but seems from the description that it might help !
I will explore once i have more time if u find the above submission not helpful.
--sreeram
  댓글 수: 1
Antriksh
Antriksh 2011년 11월 7일
thanks for this,
ok that solved the problem to some extent,but i am trying to transfer multiple values.

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


Fangjun Jiang
Fangjun Jiang 2011년 11월 4일
You need to be more specific. Overall, in your GUI function, you can use sim() to run the simulation of your Simulink model. The results can be set up to be saved in the base workspace or function workspace. Then your GUI function will be able to access the results.
  댓글 수: 6
Antriksh
Antriksh 2011년 11월 7일
thanks for this,
got that array in the workspace,but it is a matrix with so many values,and i am supposed to show a single value in GUI,how will i select(or transfer) the final result value?
Fangjun Jiang
Fangjun Jiang 2011년 11월 7일
If you just want the final value, use simout(end), assuming "simout" is the variable name and it is saved as "array" and it is a scalar signal. Keep in mind, that value changes if you change the simulation stop time. If you simulation stops at 10 seconds, that value reflects the signal value at 10 seconds. If the simulation stops at 100 seconds, that is the signal value at 100 seconds.

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


Sreeram Mohan
Sreeram Mohan 2011년 11월 4일
You could just simulate the model using the command
sim
and then pass the returned results on to a edit field on a GUI using callback functions !
--sreeram
  댓글 수: 1
Antriksh
Antriksh 2011년 11월 6일
thanks for the reply......this is what exactly i am trying to do,but i am asking how to transfer those.simulation part is done.

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

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by