if statement block in Simulink accumulates last true value -


if statement in simulink not in programming language, accumulates last true value untill occurs again.

as can seen here, when random value lower 0.5 (if condition) output dosn't give 0 1 expects if statement.

enter image description here

what proper way use if? (where preferably don't want put saturation , matlab function)

the out block within if action subsystem has property either hold or reset output when disabled. default hold; want reset. you'll need specify 0 initial condition, it'll reset to.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -