How to link a plot or continous data from M-file to Simulink Model

6 Ansichten (letzte 30 Tage)
I have done a wind turbine Model. In M-file ,I have written the code of the wind power characteristics for different wind speed with respect to rootr speed. Please, help me ..How can I link the wind speed (Wind~Time graph)from M-file to Simulink Model??
When I used "Sim..." command only latest data came. Here, The wind Speed~Time is a continuous graph or data.So, How can I call the continuous datas or graph from the M-file to Simulink Model.

Akzeptierte Antwort

Muruganandham Subramanian
Muruganandham Subramanian am 27 Dez. 2012
Bearbeitet: Muruganandham Subramanian am 27 Dez. 2012
Have you tried with From workspace block?
  1 Kommentar
chittaranjan pradhan
chittaranjan pradhan am 23 Jan. 2014
Thank you, Sir....Mr. Muruganandham Subramanian
your answer was very helpful. Sir, i want to run my model for 10-Second. I want sine wave upto 5-sec and then from 5-sec to 10-sec, 2 as a constant value. When i use *If* or *For* -loop , i am unable to call the M-file program to simulink model. please, give some idea to me...
Thanking you Chittarnajan

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 27 Dez. 2012
Bearbeitet: Azzi Abdelmalek am 27 Dez. 2012
You can use from file or from workspace block
Example
t=0:0.1:10
y=sin(t)
ty=[t' y']
then set the value of your from workspace block to ty
  2 Kommentare
chittaranjan pradhan
chittaranjan pradhan am 21 Jan. 2014
Thank you Sir for your answer. Sir, I am using MATLAB version-R2010a. In R2010a-version, in WORKSPACE BLOCK, there is no option for "Inherit: auto" like 2013a-version. So how can i call my wave form from, M_file to simulink.i want your help...
chittaranjan pradhan
chittaranjan pradhan am 23 Jan. 2014
Thank you, Sir....Mr. Azzi Abdelmalek
your answer was very helpful. Sir, i want to run my model for 10-Second. I want sine wave upto 5-sec and then from 5-sec to 10-sec, 2 as a constant value. When i use *If* or *For* -loop , i am unable to call the M-file program to simulink model. please, give some idea to me...
Thanking you Chittarnajan

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu View and Analyze Simulation Results finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by