Vous êtes sur la page 1sur 7

SOLUCION PREGUNTA 1

Solucin:
x=[-11 -16 51 10;12 1 -10 -11; 50 26 -25 -5; 10 -16 -15 1; 11 -18 -11 1;
5 51 -6 -5]
w=[1.24 1.11 2.2 2; 1.74 2.35 4 4; 5.74 1.35 2 2; -1.81 2.96 1 -3]
b=[2.11 -3.00 0 -2.2]
B=[b;b;b;b;b;b]%Matriz de 6 filas de 4 columnas
net=x*w+B
y=hardlims(net)

x=
-11
12
50
10
11
5

-16
1
26
-16
-18
51

51 10
-10 -11
-25 -5
-15
1
-11
1
-6 -5

w=
1.2400
1.7400
5.7400
-1.8100

1.1100
2.3500
1.3500
2.9600

2.2000 2.0000
4.0000 4.0000
2.0000 2.0000
1.0000 -3.0000

b=
2.1100 -3.0000

0 -2.2000

B=
2.1100
2.1100
2.1100
2.1100
2.1100
2.1100

net =
235.2700
-18.7600
-25.1000
-101.2400

-3.0000
-3.0000
-3.0000
-3.0000
-3.0000
-3.0000

0
0
0
0
0
0

-2.2000
-2.2000
-2.2000
-2.2000
-2.2000
-2.2000

45.6400 23.8000
-33.3900 -0.6000
65.0500 159.0000
-46.7900 -71.0000

-16.2000
38.8000
166.8000
-79.2000

-80.5200 -44.9800 -68.8000 -77.2000


71.6600 99.5000 198.0000 214.8000
y=
1
-1
-1
-1
-1
1

1
-1
1
-1
-1
1

1
-1
1
-1
-1
1

-1
1
1
-1
-1
1

ASI CAMBIEMOS EL BIAS=0 LA SALIDA NO CAMBIA, SIGUE SIENDO LA SALIDA


QUE SE DESEA

2.11
X1

1.24
1.74

Y1

5.74
-1.81
X2

1.11
2.35

X3

1.11
Y2
1.35
2.96
2.2

2.2

Y3

4
X4
2

1
2

-3

2
Y4
41

SOLUCION PREGUNTA 2
Solucin

x=[-11 -16 51 10;12 1 -10 -11;50 26 -25 -5;10 -16 -15 1;11 -18 -11 1; 5
51 -6 -5]
w=[1.24 1.11 2.2 2;1.74 2.35 4 4; 5.74 1.35 2 2;-1.81 2.96 1 -3]
b=[0 0 0 0]
B=[b;b;b;b;b;b];
NET=x*w+B

y=hardlims(NET)

x=
-11
12
50
10
11
5

-16
1
26
-16
-18
51

51 10
-10 -11
-25 -5
-15
1
-11
1
-6 -5

w=
1.2400
1.7400
5.7400
-1.8100

b=
0

1.1100
2.3500
1.3500
2.9600

2.2000 2.0000
4.0000 4.0000
2.0000 2.0000
1.0000 -3.0000

NET =
233.1600 48.6400 23.8000 -14.0000
-20.8700 -30.3900 -0.6000 41.0000
-27.2100 68.0500 159.0000 169.0000
-103.3500 -43.7900 -71.0000 -77.0000
-82.6300 -41.9800 -68.8000 -75.0000
69.5500 102.5000 198.0000 217.0000
y=
1
-1
-1
-1
-1
1

1
-1
1
-1
-1
1

1
-1
1
-1
-1
1

-1
1
1
-1
-1
1

0
X1

1.24
1.74

Y1

5.74
-1.81
X2

1.11
2.35

X3

0
Y2
1.35
2.96
2.2

2
0

Y3
4

X4
2

1
2

-3

0
Y4
41

SOLUCION PREGUNTA 3
x =
1.1
w =
b =

[0.59 1.72; -2.67 2.50; 1.43 -3.19; 3.25 -2.88; -1.38 1.14; 2.3 3.3;
-2.1;2.5 3.5]
[10.74 1.35 2.4 3.5 -6.7 2.3; -4.81 2.95 1.5 -3 2.2 1.0]
[2.4 -3.5 -4.81 2.96 1.0 -2]

B = [b;b;b;b;b;b;b;b];
Net=x*w + B;
y=hardlims(Net);
yd=y;
x1=linspace(-4,4,10);
x2=(x1*-10.74-2.4)/(-4.81);

x21=(x1*-1.35+3.5)/(2.95);
x22=(x1*-2.4+4.81)/(1.5);
x23=(x1*-3.5-2.96)/(-3);
x24=(x1*6.7-1.0)/(2.2);
x25=(x1*-2.3+2)/(2.95);
figure(1)
hold on
plot(x1,x2),% Grafico de la Primera Recta
plot(x1,x21)% Grafico de la Segunda Recta
plot(x1,x22),% Grafico de la Tercera Recta
plot(x1,x23)% Grafico de la Cuarta Recta
plot(x1,x24),% Grafico de la Quinta Recta
plot(x1,x25)% Grafico de la Sexta Recta
plot(x(1,1),x(1,2),'k+'),text(x(1,1)+.2,x(1,2)+.4,'Primer Patrn')
plot(x(2,1),x(2,2),'k^'),text(x(2,1)+.2,x(2,2)+.4,'Segundo Patrn')
plot(x(3,1),x(3,2),'rs'),text(x(3,1)+.2,x(3,2)+.4,'tercer Patrn')
plot(x(4,1),x(4,2),'mo'),text(x(4,1)+.2,x(4,2)+.4,'Cuarto Patrn')
plot(x(5,1),x(5,2),'mo'),text(x(5,1)+.2,x(5,2)+.4,'Quinto Patrn')
plot(x(6,1),x(6,2),'rs'),text(x(6,1)+.2,x(6,2)+.4,'Sexto Patrn')
plot(x(7,1),x(7,2),'mo'),text(x(7,1)+.2,x(7,2)+.4,'Septimo Patrn')
plot(x(8,1),x(8,2),'rs'),text(x(8,1)+.2,x(8,2)+.4,'Octavo Patrn')
grid on
hold off
yd =
1
-1
1
1
-1
1
1
1

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

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

-1
-1
1
1
-1
1
1
1

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

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

Para X1:

Para X2:

w11 = 10.74
-4.81

w21 =

w12 = 1.35
2.96

w22 =

w13 = 2.4

w23 =

w14 = 3.5

w24 =

w15 = -6.7

w25 =

w16 = 2.3

w26 =

1.5
-3
2.2
1

INTEGRANTES

1.
2.
3.
4.

COICA CERRON MARCO ANTONIO


GAMARRA FUERTES JOSE ANTONIO
SACSA CHULLUNCUY CARLOS ALBERTO
BEJAR VEGA UBALDO FABIO

Vous aimerez peut-être aussi