just to add a detail: I can embed a code in the simulnk also. for example, if stop_time is the stoptime of the model, then, if possible, i can write a code in the simulink model itself to change the const value at stop_time/2 and 3*stop_time/4 instead of using an m file
how to control a contant/ trigger signal in simulink FROM an m-file?
5 ビュー (過去 30 日間)
古いコメントを表示
vainateya goldar
2015 年 6 月 11 日
回答済み: vainateya goldar
2015 年 6 月 11 日
Hi! I'm using an m file to control a simulation (simulink slx file). The user enters the stop time. When the simulation time reaches its half value, (ie halfway through the simulation,) I need to change a constant from 0 to 1. when it reaches 75%, I need to change the (same) constant source from 1 to 0.
so my question is, how do we control the value of the constant block (or any other block that can produce a const, eg. a step block, or signal generator) with respect to the simulation time from an m file?
Please help me.. I googled a lot but couldn't find a solution thanks
採用された回答
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!