LDA error Sum(Double(Group));

1 visualizzazione (ultimi 30 giorni)
Lester Lim
Lester Lim il 17 Gen 2013
Hi, I need hlp in continuing this program. No matter what variable I put into it it always gives the same error...
if (nargin >= 3) PriorProb = Priors; end %Against different classes for i = 1:k,% Loop over classes to perform intermediate calculations % Establish location and size of each class Group = (Target == ClassLabel(i)); nGroup(i)= sum(double(Group));** % Calculate group mean vectors GroupMean(i,:) = mean(Input(Group,:)); % Accumulate pooled covariance information PooledCov=PooledCov+((nGroup(i)-1)/(n-k)).* cov(Input(Group,:)); end
Error: In an assignment A(I) = B, the number of elements in B and I must be the same.
ERROR-nGroup(i)= sum(double(Group));

Risposte (0)

Categorie

Scopri di più su Statistics and Machine Learning Toolbox 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