How to Converting sine wave to a square wave in stateflow without invoking simulink function?
Ältere Kommentare anzeigen
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 Kommentare
TAB
am 6 Dez. 2012
What do you mean by time period, Sample time OR current simulation time ?
Azzi Abdelmalek
am 6 Dez. 2012
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
am 7 Dez. 2012
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 6 Dez. 2012
0 Stimmen
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
Kategorien
Mehr zu Simulink Functions finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
