How to Converting sine wave to a square wave in stateflow without invoking simulink function?
7 ビュー (過去 30 日間)
古いコメントを表示
i tried using the formula square(t) = sgn(sin(2πt)), but it how can the time period calculated by stateflow. and if we invoke simulink fn what has to be done?
thanks in advance
3 件のコメント
Azzi Abdelmalek
2012 年 12 月 6 日
Do you want to generate a square wave, or to transform a sine wave to a square wave. If it's a second option, where did the sine wave come from? from Simulink? or generated in Stateflow?
採用された回答
TAB
2012 年 12 月 7 日
Even though it is not clear what you want to do, I have attached image to describe how you can work with Simulink function.

0 件のコメント
その他の回答 (1 件)
Azzi Abdelmalek
2012 年 12 月 6 日
If you need a time value, in your Simulink model, add a clock block from Simulink/Sources and connect it as an input to your Stateflow chart
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!