Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
>> p
p =
3 -3
-3 3
>> p1
p1 =
-3 -2 -1 0 1 2 3
>> perceptron = newp(p1, 1);
??? Error using ==> newp>new_5p1_size at 153
Input ranges is not a two column matrix.
Error in ==> newp at 78
net = new_5p1_size(varargin{:});
>> perceptron = newp(p, 1);
??? Error using ==> newp>new_5p1_size at 156
Input ranges has values in the second column larger in the values in the same
row of the first column.
Error in ==> newp at 78
net = new_5p1_size(varargin{:});
>> p2 = [-3 3 ; -3 3];
>> perceptron = newp(p2, 1);
>> entrada = [0 1 2 -1 1;0 2 1 -1 0];
>> entrada
entrada =
0 1 2 -1 1
0 2 1 -1 0
>> objetivo = [1 1 0 1 0];
>> objetivo
objetivo =
1 1 0 1 0
>> plotpv(entrada,objetivo);
>> perceptron = train(perceptron,entrada,salida);
??? Undefined function or variable 'salida'.
>> perceptron = train(perceptron,entrada,objetivo);
>> y = sim(perceptron,entrada);
>> y = sim(perceptron,entrada)
y =
1 1 0 1 0
>> objetivo
objetivo =
1 1 0 1 0
>> plotpv y
??? Error using ==> plotpv at 48
Not enough arguments.
>> plotpv (y);
??? Error using ==> plotpv at 48
Not enough arguments.
>> y1 = sim(perceptron, [1 ;1])
y1 =
1
>> plotpc(perceptron.IW{1},perceptron.b{1});
--------------------------------------------------------------------------------
--
>> y = Y
y =
-1.7404
-1.7263
-1.5160
-0.1558
>> plot(x,y, 'r', x , entradas(1,:), 'g' , x, entradas(2,:), 'y', x , objetivos,
'b');
??? Error using ==> plot
Vectors must be the same lengths.
>> x
x =
-2 -1 0 1 2
>> y
y =
-1.7404
-1.7263
-1.5160
-0.1558
>> x = [-2:1]
x =
-2 -1 0 1
>> plot(x,y, 'r', x , entradas(1,:), 'g' , x, entradas(2,:), 'y', x , objetivos,
'b');
>>