필터 지우기
필터 지우기

not inuff input argument

조회 수: 1 (최근 30일)
Prashant Saini
Prashant Saini 2021년 3월 17일
답변: Roy Kadesh 2021년 3월 17일
function [itr] = multisvm( T,C,tst )
u=unique(C);
N=length(u);
c4=[];
c3=[];
j=1;
k=1;
if(N>2)
itr=1;
classes=0;
cond=max(C)-min(C);
while((classes~=1)&&(itr<=length(u))&& size(C,2)>1 && cond>0)
c1=(C==u(itr));
newClass=c1;
svmStruct = fitcsvm(T,newClass,'Kernel_Function','rbf','Method','QP');
classes = Classificationsvm(svmStruct,tst);
for i=1:size(newClass,2)
if newClass(1,i)==0
c3(k,:)=T(i,:);
k=k+1;
end
end
T=c3;
c3=[];
k=1;
% This is the loop for reduction of group
for i=1:size(newClass,2)
if newClass(1,i)==0
c4(1,j)=C(1,i);
j=j+1;
end
end
C=c4;
c4=[];
j=1;
cond=max(C)-min(C);
if classes~=1
itr=itr+1;
end
end
end
end
can anyone help me to solve this error
ERROR
>> multisvm
Not enough input arguments.
Error in multisvm (line 2)
u=unique(C);

답변 (1개)

Roy Kadesh
Roy Kadesh 2021년 3월 17일
You are calling your function without any inputs (probably because you clicked the big friendly green button).
You should call your function with inputs. What are the values of T, C and tst you want to run this function for?

카테고리

Help CenterFile Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by