フィルターのクリア

LDA error Sum(Double(Group));

1 回表示 (過去 30 日間)
Lester Lim
Lester Lim 2013 年 1 月 17 日
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));

回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by