How to Converting sine wave to a square wave in stateflow without invoking simulink function?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Azzi Abdelmalek
le 6 Déc 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?
Réponse acceptée
TAB
le 7 Déc 2012
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 commentaires
Plus de réponses (1)
Azzi Abdelmalek
le 6 Déc 2012
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 commentaires
Voir également
Catégories
En savoir plus sur Simulink Functions dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!