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

2 visualizzazioni (ultimi 30 giorni)
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!!!

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Matrices and Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by