Accelerating the pace of engineering and science

# Documentation

### Contents

• Function Fitting and Approximation
• Pattern Recognition and Classification
• Clustering
• Dynamic Modeling and Prediction
• Control Systems and Simulink
• Self-organizing Networks
• Adaptive Linear Filters
• Radial Basis Networks
• LVQ Networks
• Simple Applications
• Hopfield Networks
• Perceptrons
• Other Examples

## Hopfield Spurious Stable Points

A Hopfield network with five neurons is designed to have four stable equilibria. However, unavoidably, it has other undesired equilibria.

We would like to obtain a Hopfield network that has the four stable points defined by the two target (column) vectors in T.

```T = [+1 +1 -1 +1; ...
-1 +1 +1 -1; ...
-1 -1 -1 +1; ...
+1 +1 +1 +1; ...
-1 -1 +1 +1];
```

The function NEWHOP creates Hopfield networks given the stable points T.

```net = newhop(T);
```

Here we define 4 random starting points and simulate the Hopfield network for 50 steps.

Some initial conditions will lead to desired stable points. Others will lead to undesired stable points.

```P = {rands(5,4)};
[Y,Pf,Af] = net({4 50},{},P);
Y{end}
```
```ans =

1    -1     1     1
1    -1     1    -1
-1    -1     1     1
1     1     1     1
-1     1     1     1

```