how to change simulink block properties from matlab pogram?
古いコメントを表示
I have created a simulink model in which there are two 3-phase fault blocks. i want to change the fault block properties (like faulty phase, fault resistance..etc) from matlab program (m file) and run the model.. How to do that?
採用された回答
その他の回答 (2 件)
Valmir Sadiku
2013 年 5 月 15 日
Hello,
One possible way are that you use parameter in your 3-phase fault block. Then write an M-File in which you can generate/change the values of this parameter (which are now stored in the Workspace) and open the Simulink model from matlab with the command:
results = sim('myFaultyModel');
regards V.Sadiku
3 件のコメント
Harish Balaga
2013 年 5 月 15 日
Valmir Sadiku
2013 年 5 月 15 日
as i already wrote above you can modify your parameter on the M-File simply, e.g. :
parameter_1 = 12.1;
parameter_2 = 1.05;
......
parameter_x = 0.1;
..
now you can the call the model, which runs with changed parameter values
sim('myFaultyModel');
then maybe with another parameter again:
parameter_1 = 12.8;
parameter_2 = 1.0;
......
parameter_x = 0.18;
..
and call the model again and so on.
Harish Balaga
2013 年 5 月 15 日
Valmir Sadiku
2013 年 5 月 15 日
0 投票
Then maybe this will help you: http://www.mathworks.de/de/help/simulink/slref/block-specific-parameters.html
カテゴリ
ヘルプ センター および File Exchange で Magnetic Elements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!