Info

This question is closed. Reopen it to edit or answer.

index exceeds matrix dimensions: matlab

1 view (last 30 days)
AMAL targhi
AMAL targhi on 9 Jun 2016
Closed: John D'Errico on 9 Jun 2016
This is my code i get the error index matrix dimensions in this line:
network.meansqrerr {n} = plus( network.meansqrerr {n}, mse( network.error));|
the objectif of this line is sum of series of meansqrerr like symsum( but for quaternions)
for this line network.meansqrerrr {1} = [0 0 0 0 ] because my values are quaterionic and i need to itilialise it
function network = BUILD(inputs, targets, iterations)
% regle pour determiner le noombre des neurones dans la couche caheée
% source: stackoverflow
% Determiner hidden neuroness ( dans la couche caché couche2)
% round pour les virgules
nhidden = round((size(inputs, 1) + size(targets, 1)) * 2 / 3);
% %
% fprintf(' le nombre des couches cachés est: ')
disp(nhidden) ;
% Create a neural network
% on determine le nombre des neurones dans chaque couche
% couche1: le nombre des entrées
% couche 3 (output) le nombre des classe
network = Create(size(inputs, 1), nhidden, size(targets, 1));
% Iteration variables
% SOMME Des erreurs quadratique
n = 1;
% Train network jusk le max des iterations
%zeros_quat(zeros (10,1));
while n <= iterations
network.meansqrerr{1} = [ 0 0 0 0 ];
% Training epoch
% nombre des colonnes : size(inputs, 2)
for i=1:size(inputs, 2)
% Train network with inputs and target value
network = traine(network, inputs(:,i), targets(:,i));
% % Update sum squared error
network.meansqrerr {n} = plus( network.meansqrerr {n}, mse( network.error));
disp(['Iteration: ', num2str(n), ' / ' 'Error: ', num2str(double(network.meansqrerr{n}) )]);
%
%
% % afficher les erreurs dans chaque iteration
% disp(['Iteration: ', num2str(n), ' / ' 'Error: ', num2str(network.meansqrerr(n) )]);
% %
%
% Update iteration number
n = n + 1;
end
% afficher les poids
end
  1 Comment
Walter Roberson
Walter Roberson on 9 Jun 2016
I cannot proceed any further on this until you explain the difference between this question and your earlier http://www.mathworks.com/matlabcentral/answers/288632-index-exceeds-matrix-dimension

Answers (0)

This question is closed.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!