Attempted to access PriorProb(8); index out of bounds because numel(PriorProb)=7.

2 visualizaciones (últimos 30 días)
Error: Attempted to access PriorProb(8); index out of bounds because numel(PriorProb)=7.
What does this error mean? I got it when I put in:
W(i,1) = -0.5 * Temp * GroupMean(i,:)' + log(PriorProb(i));
I have 7 prior probability numbers that I used and this error showed up. Need help!!!

Respuesta aceptada

Matt J
Matt J el 21 de En. de 2013
You must prevent the index variable i from reaching a value of 8.
  7 comentarios
Lester Lim
Lester Lim el 22 de En. de 2013
Thanks for the help! Im trying it right now and welcome other suggestions...

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by