How to Converting sine wave to a square wave in stateflow without invoking simulink function?
이전 댓글 표시
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
TAB
2012년 12월 6일
What do you mean by time period, Sample time OR current simulation time ?
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?
lakshmi Krishnan
2012년 12월 7일
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2012년 12월 6일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
