how can i give m-file output to simulink model as input

조회 수: 52 (최근 30일)
renu avinaash
renu avinaash 2012년 12월 10일
편집: Ajay Kumar 2016년 8월 28일
i am trying to link a m-file out put to a simulink model as input

답변 (3개)

Azzi Abdelmalek
Azzi Abdelmalek 2012년 12월 10일
What do you mean by m-file output? If it's a constant variable use TAB's answer, If it's a signal, use from file block, else, explain it.
  댓글 수: 1
Ajay Kumar
Ajay Kumar 2016년 8월 28일
편집: Ajay Kumar 2016년 8월 28일
Hie Azzi, I have a problem I have a Matlab code for random road profile which is generated from an equation..with this code I'm able to generate random road profile but, I couldn't give it as an input road for half car Simulink suspension mode. here is the code:

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


TAB
TAB 2012년 12월 10일
편집: TAB 2012년 12월 10일
  1. Save your m-file output to base workspace in a variable say MayVar.
  2. Put a constant block in simulink model and put value = MyVar.
  3. Simulate your model. Constant block will the value from base workspace and pass pass it to following blocks.

Muruganandham Subramanian
Muruganandham Subramanian 2012년 12월 10일
편집: Muruganandham Subramanian 2012년 12월 10일
Your question is already answered, First check and ask question..

카테고리

Help CenterFile Exchange에서 Interactive Model Editing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by