Return attractor length and states in attractor.
[attrLength, attrStates] = findAttractor(tsm)
[attrLength, nodeAtAttractorEntry, tsmOut] = findAttractor(node, mode, tMax)
searches tsm for an attractor and returns its length and the node-states in the attractor.
mode, tMax) evolves all nodes in node in mode update-scheme until an
attractor is found. Returns attractor length, node structure-array in its first attractor state
and the time state matrix up to and including the first attractor state. If after
tmax steps no attractor is found, then the search is stopped and
attrLength is set to zero.
tsm - n x k+1 matrix containing node-states for n nodes at k timesteps
node - 1 x n structure-array containing node information
mode - String defining update scheme. Currently supported modes are:
CRBN, ARBN, DARBN, GARBN, DGARBN
tMax - Maximal number of time-steps to search for attractor
attrLength - Attractor length; if tMax has been reached before having found an attractor,
then attrLength is set to zero.
attrStates - n x attractorLength matrix with all node states in attractor
nodeAtAttractorEntry - 1 x n structure-array containing node information on entry in attractor
tsmOut - n x k+1 matrix containing node-states for n nodes at k timesteps.
The visualization contains node states up to and including the
first attractor state.
The following commands create a
network (N=50 and K=3) and search for an attractor in CRBN
update-mode. The maximum number of time-steps to search for the
attractor is set to infinity.
>> [node, conn, rule] = bsn(50,3,'line');
>> [attrLength, node, tsm] = findAttractor(node,'CRBN',inf);
The evolution of the network up to and including the first attractor state can be visualized:
attrLength = 42
In order to evolve the network
in the attractor, type:
>> [node, tsm] = evolveCRBN(node,200);
Now we can use the first syntax
of the findAttractor function to check that the attractor length
is really 42:
>> [attrStates, attrLength2] = findAttractor(tsm);
attrLength2 = 42