Why does an if block only run once?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Jon Emonson
il 26 Ott 2016
Commentato: Jon Emonson
il 26 Ott 2016
I have an issue in Simulink where I have to condition an output signal which currently is a striaght line, but should reset to zero when it hits a multiple of 360 degrees. This has been done by taking the input and subtracting 360 if true, else it's a straight-through. I've already tried an if-else block and action subsystems, however that seems to only execute once (i.e. when the output reaches 360 for the first time, after that it continues past 360 until the simulation times out).
Any ideas?

0 Commenti
Risposta accettata
Più risposte (2)
Terek Li
il 26 Ott 2016
'if' statement is not a loop, if you want to look it then use 'while'
0 Commenti
Vedere anche
Categorie
Scopri di più su Discontinuities in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!