Function Reference
Initialisation | Evolution | Statistics | Data Management
 
Introduction
RBN Overview
Using the Toolbox
Function Reference
Research/Gallery
Download
Literature/Links
Contact
 

 

 

 

 

 
 
 
 


countTransitionsPerNode()

Count number of changes of a node through evolution.

Syntax

nbChangesPerNode = countTransitionsPerNode(tsm)

Description

countTransitionsPerNode(tsm) counts for all nodes in tsm how many times they have changed state over all discrete time-steps. 

Input:
tsm - n x k+1 matrix containing node-states for n nodes at k timesteps

Output: 
nbChangesPerNode - Number of changes of each node (column vector)

Example

>> [node, conn, rule] = bsn(15,4,'line');
>> [node, tsm] = evolveARBN(node,50);
>> transitions = countTransitionsPerNode(tsm);

The vector transitions now contains the number of state changes that each node has made in the evolution over 50 time-steps in ARBN-update mode.

transitions = [3 0 1 0 0 1 1 0 1 0 1 1 0 1 1]'

 

See also

resetNodeStats(), displayNodeStats(),

 

 
 
 
      Christian Schwarzer - EPFL