How do I use a variable in dialog box?

5 views (last 30 days)
Prinsis Garcee
Prinsis Garcee on 19 Dec 2013
Commented: Prinsis Garcee on 19 Dec 2013
I am working on DFIG wind turbine now, and I want to control the output power.
Given enough wind speed, whatever we type in the "nominal output mechanical power" becomes the output.
However, I want the wind turbine to just output the necessary power, so I want to use a variable Pref.
Do you know how can I make this work?
I have attached a jpeg file for more info.
Thanks!

Answers (1)

Walter Roberson
Walter Roberson on 19 Dec 2013
field_as_string = get(handles.TheFieldName, 'String');
if strcmpi(field_as_string, 'pref')
....
else
desired_output = str2double(field_as_string);
...
end
  1 Comment
Prinsis Garcee
Prinsis Garcee on 19 Dec 2013
Walter Roberson, thank you very much.
How do I run this along with the model simulation? I have a feedback loop, so the value of Pref depends on the result of the simulation.
(confused)

Sign in to comment.

Categories

Find more on Wind Power in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!