Add elements to an array in Matlab

Asked

Viewed 1,834 times

1

Basically, I need to enter a single for, add elements to an array or list (I don’t know if it’s in the language) and then divide the values by the amount of interactions. Very simple, if it were in any other language, but as I have little or no knowledge in MATLAB, it is very complex.

Till now I’ve done it that way:

maxInteracao = 10;
for index = 1 : maxInteracao
//stuff

erroClassifTeste = 100 * (classificacoesErradas/numTeste);
arrayErro := [] : append(erroClassifTeste);
end

1 answer

1


Follows:

maxInteracao = 10;
for index = 1 : maxInteracao
//stuff

erroClassifTeste = 100 * (classificacoesErradas/numTeste);
arrayErro [i] = erroClassifTeste;
end

Browser other questions tagged

You are not signed in. Login or sign up in order to post.