You are on page 1of 1

clc, clear, close all

P = [0.7 1.5 2.0 0.9 4.2 2.2 3.6 4.5;


3 5 9 11 0 1 7 6];

Z=[P;1 1 1 1 1 1 1 1];

T=[-1 -1 -1 -1 1 1 1 1;
-1 -1 1 1 -1 -1 1 1];

%Regla de Widrow-Hoff

R=Z*Z'/8;
H=Z*T'/8;
X=inv (R)*H
W=X(1:end-1,:)'
b=X(end,:)'

%Comprobaci�n

for q=1:8
e(:,q)=T(:,q)-hardlims(W*P(:,q)+b);
end

You might also like