MATLABコードがあるのであれば、ラッチ回路部分はMATLAB Functionブロックに移植するのが良いと思います。
SIN波は外部から入力したとして、MATLAB Functionブロック内部のコードはこんな感じになります。
function y = fcn(u)
persistent flg
if isempty(flg)
flg = 0;
end
if flg == 1
flg = 1;
else
if u == 1
flg = 1;
end
end
y = flg;
Simulinkブロック線図で書くのであれば下図のようになります。

