Counter:

Path: SC/Sensor

% Simulate a counter.
--------------------------------------------------------------------------
   Form:
   count = Counter( action, d )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   action       (1,:)     'initialize', or 'update'
   d            (1,1)     action == 'initialize'
                          .nBits   (n,1) number of bits
                          .id      (1,1) id
                          action == 'update'
                          .counts  (n,1)
                          .id      (1,1) id        

   -------
   Outputs
   -------
   count        (1,1)     Counts

--------------------------------------------------------------------------

Back to the SC Module page