redes neuronales con matlab, entrada
Voy a dejar el código porque me da error....
targets=xlsread('ENTRADAS Y SALIDAS1.xls','salida');
%matriz 24x42
inputs1=xlsread('ENTRADAS Y SALIDAS1.xls','entrada1');
%matriz 24x42
inputs2=xlsread('ENTRADAS Y SALIDAS1.xls','entrada2');
%matriz 24x42
inputs3=xlsread('ENTRADAS Y SALIDAS1.xls','entrada3');
%matriz 24x42
inputSeries = horzcat (inputs1, inputs2, inputs3);
targetSeries = targets;
% Create a Nonlinear Autoregressive Network with External Input
inputDelays = 1:4;
feedbackDelays = 1:4;
hiddenLayerSize = 10;
net = narxnet(inputDelays,feedbackDelays,hiddenLayerSize);
% Prepare the Data for Training and Simulation
[inputs,inputStates,layerStates,targets] = preparets(net,inputSeries,{},targetSeries);
% Setup Division of Data for Training, Validation, Testing
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train the Network
[net,tr] = train(net,inputs,targets,inputStates,layerStates);
% Test the Network
outputs = net(inputs,inputStates,layerStates);
errors = gsubtract(targets,outputs);
performance = perform(net,targets,outputs)
% View the Network
view(net)
% Closed Loop Network
netc = closeloop(net);
netc.name = [net.name ' - Closed Loop'];
view(netc)
[xc,xic,aic,tc] = preparets(netc,inputSeries,{},targetSeries);
yc = netc(xc,xic,aic);
closedLoopPerformance = perform(netc,tc,yc)
nets = removedelay(net);
nets.name = [net.name ' - Predict One Step Ahead'];
view(nets)
[xs,xis,ais,ts] = preparets(nets,inputSeries,{},targetSeries);
ys = nets(xs,xis,ais);
earlyPredictPerformance = perform(nets,ts,ys)
el error es:
>> redesfeedback
Index exceeds matrix dimensions.
Error in preparets (line 293)
xi = xx(:,FBS+((1-net.numInputDelays):0));
Error in redesfeedback (line 32)
[inputs,inputStates,layerStates,targets] = preparets(net,inputSeries,{},targetSeries);
Y mi otra duda es, si puedo meter las tres entradas de forma individual es decir
input1 una entrada de la red, input2 otra entrada de la red y input3 otra entrada de la red o por el contrario lo tengo que unir en la matriz tal y como lo hago aqui.
Muchas gracias la verdad es que ando muy perdida