Instructions for running Hopfield network simulation
----------------------------------------------------
1. Load the file 'patterns.mat' into matlab. This contains three 100x1
vectors, X, O, and S. You can display these as 10x10 images using the
command:
imagesc(reshape(X,10,10)), axis square
2. Store the three patterns into the network association matrix, T,
using the outer product rule:
T = X*X' + O*O' + S*S';
3. Now initialize the network state to one of these patterns and let
it run. It should stay put at that pattern.
net_state=X;
hopnet
4. Now randomize some percentage of the bits and see where the network
state converges as a function of the number of bits perturbed:
net_state=X;
i=ceil(100*rand(30,1));
net_state(i)=-X(i);
hopnet
5. If you like, you can generate additional patterns using the script
'genpat.m' and store these patterns as well to push the capacity of
the network.