DFlipFlop

DFlipFlop

Diagram Context expand

if isequal(edge2, '!CLR')
  mat = [[0; 0; 0; 1],[1; 1; 1; 0]];
  edge1 = '>0 to <=0';
elseif isequal(edge2, 'CLR')
  mat = [[0; 1; 0; 0],[1; 0; 1; 1]];
  edge1 = '<=0 to >0';
else
  error ('Error, wrong type of edge for CLR signal');
end
if isequal(edge, 'Falling')
  edge = '>0 to <=0';
elseif isequal(edge, 'Rising')
  edge = '<=0 to >0';
else
  error ('Unexpected edge method');
end