Simulink simulation to confirm the change of a state after n number of cycles
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Greetings,
I am trying to build a Simulink simulation of an existing electronic element that is used to confirm the change to the boolean true of the input that is maintained after a specified number of cycles n. It is fairly easy to use a matlab script, but I am trying to integrate it to logical blocks that need to be optimized, since the number of blocks is dynamic and varies with the number of cycles and I need to use this block in hundreds of instances, I can't possibly build it using the traditional way of delaying the input n times and verifying that all the delayed states are true, is there any built in function that might help me?
Algorithm:
IF IN(k) = In(k-1) =… = In(k-Nb_cycles) = true THEN
Out(k) = true
ELSE
Out(k) = false
Thank you
0 Commenti
Risposte (1)
Fangjun Jiang
il 10 Set 2020
Use a "Detect Change" block and a "Counter" block. If no change is detected for "Nb_cycles" times, the output is ture, otherwise, it is false.
0 Commenti
Vedere anche
Categorie
Scopri di più su Sources 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!