Вы находитесь на странице: 1из 5

Matlab 6.

. Matlab.
. . ,
.

1. "
CF".
1. MATLAB
.
2. P
T.
P = [0 1 2 3 4 5 6 7 8 9 10];
T = [0 5 0 0 4 1 8 1 3 3 4];
3. 70 .

Matlab M

%
P = [0 1 2 3 4 5 6 7 8 9 10];
%
T = [0 5 0 0 4 1 8 1 3 3 4];
%
net = newcf([0 10],[5 1],{'tansig' 'purelin'});
gensim(net);
% 70
net.adaptParam.epochs = 70;
net = train(net,P,T);
%
Y = sim(net,P);
plot(P, T, P, Y, 'O')

2. " LIND".

1. MATLAB LIND,
.
2. :
P = [1 : (1/3) : 2];
T = [9.0 7.4 8.1 0.5];
3. .
Y = sim(net,P);
4. .

Matlab M

%
P = [1:(1/3):2];
%
T = [9.0 7.4 8.1 0.5];
%
LIND = newlind(P,T);
gensim(LIND);
%
LIND.IW{1}, LIND.b{1};
%
Y = sim(LIND,P);
plot(P, T)

4. " , ".
1. MATLAB
: [0 1 2], 1 ,
[0 1], 0.01.
2. 1, 1 2, 2,
10 .
3. :
1, 1 ( 100 );
,
3 = [P1 P2] T3 = [T1 T2].
(
), 1 2 Y = sim(net, [P1 P2]) (
net = init(net)).
4. , .

Matlab M

%
net = newlin([0 1],1,[0 1 2],0.01);
gensim(net);
%
P1 = [0 -1 0 1 0 -1 1 0 1 1];
P2 = [1 1 0 -1 1 0 1 0 -1 1];
%
T1 = [0 2 0 1 -1 0 -2 1 1 0];
T2 = [1 -2 1 0 -1 0 0 -1 1 2];
% P1 T1
net.trainParam.epochs = 100;
net = train(net,P1,T1);
%
net.IW{1}, net.b{1};

%
Y1 = sim(net,[P1 P2]);
%
net = init(net);
% P1 P2
P3 = [P1 P2];
% T1 T2
T3 = [T1 T2];
% P3 T3
net.trainParam.epochs = 100;
net = train(net,P3,T3);
%
net.IW{1}, net.b{1};
%
Y3 = sim(net,[P1 P2])

5. "".
1. MATLAB
gensim(net).
2.
.
:
P = [0 0 0 1; 1 0 11];
, ( ):
T = [0 0 0 1];

Matlab M

%
gensim(net)
net = newp([0 1; 0 1;],1);
gensim(net);
%
P = [0 0 0 1; 1 0 1 1];
%
T = [0 0 0 1];
% , 20
net.adaptParam.passes = 20;
net = adapt(net,P,T);
%
net.IW{1}, net.b{1};
%
Y = sim(net,P)