what is the reason for this changed output values?

when i multiples of statement executes inside of while loop. its not gives corrected values. and i didnt defined anything before of loop. defined all things inside of loop only ...any idea...?

6 Kommentare

Sorry we will need some example code from you.
while ~isempty(S)
X50=X0(:,S);
alpha=svmtrain(X50,Y1);
W=(((alpha.Alpha).*(alpha.GroupNames(alpha.SupportVectorIndices))))'*(alpha.SupportVectors);
m_f=alpha.SupportVectors;
tm_f= mean(m_f(1:4,:))-mean(m_f(5:7,:));
for i=1:length(W)
C(i)=W(i)*tm_f(i);
end
f=argmin(C);
r=[S(f),r];
S(f)=[];
end
....
without while loop execution i got values for X50 is 10x50,W is 1x50,S is 1x50.
but when execute in while loop i got X50 value is 10x39,W is 1x39,S is 1x39. and also shows error
??? Attempted to access S(48); index out of bounds because numel(S)=39.
Error in ==> trained at 1328 r=[S(f),r];
Have you considered stepping through the code with the debugger?
Dhines
Dhines am 7 Mär. 2013
no sir...

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Gefragt:

am 7 Mär. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by