Neural Network Toolbox | ![]() ![]() |
Problem Definition
The following code defines two sine wave forms, one with an amplitude of 1.0, the other with an amplitude of 2.0.
p1 = sin(1:20); p2 = sin(1:20)*2;
The target outputs for these wave forms is their amplitudes.
t1 = ones(1,20); t2 = ones(1,20)*2;
These wave forms can be combined into a sequence where each wave form occurs twice. These longer wave forms are used to train the Elman network.
p = [p1 p2 p1 p2]; t = [t1 t2 t1 t2];
We want the inputs and targets to be considered a sequence, so we need to make the conversion from the matrix format.
Pseq = con2seq(p); Tseq = con2seq(t);
![]() | Appelm1: Amplitude Detection | Network Initialization | ![]() |