Using check block MaxFrequency as
results in
simulation result |
Note, the check signal has first a frequency of 2 Hz, then of 4 Hz, then of 2 Hz and finally of 0 Hz. The MaxFrequency block can reproduce these frequencies approximately. It is not exact, because the frequency is only determined based on the rising and falling edges of check. However, it is slightly more precise as using the MaxRisingFrequency block that takes only the rising edges of check into account.