필터 지우기
필터 지우기

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 CenterFile Exchange에서 Statistics 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