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

Antworten (3)

Azzi Abdelmalek
Azzi Abdelmalek am 10 Dez. 2012

1 Stimme

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 Kommentar

Ajay Kumar
Ajay Kumar am 28 Aug. 2016
Bearbeitet: Ajay Kumar am 28 Aug. 2016
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:

Melden Sie sich an, um zu kommentieren.

TAB
TAB am 10 Dez. 2012
Bearbeitet: TAB am 10 Dez. 2012

0 Stimmen

  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.

Produkte

Gefragt:

am 10 Dez. 2012

Bearbeitet:

am 28 Aug. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by