I want realise a special signal relay by Simulink blocks, enveloped in a subsystem. It has 3 ports "input" & "reset"&"output", and 1 parameter "threshold". For every time step, the function is:
[Output]=subsystem(input)
if reset == 1
output=0;
end
if input >= threshold
output=1;
end
end