SVM Error - The first input should be a struct generated by SVMTRAIN

1 次查看(过去 30 天)
I am getting error using following code with SVM
SVMStruct1 = svmtrain(data,class,'kernel_function','linear');
class12=svmclassify(SVMStruct1, pdg(:,1:end-1));
Error I get is
??? Error using ==> svmclassify at 53
The first input should be a struct generated by SVMTRAIN.
I dont see a reason why it shouldnt run. Any pointers would be greatly appreciated.
Note: I just tried running the examples from the matlab webpage, but it wont even run. My guess is that somewhere something is corrupt.
Thanks
  4 个评论
Nirmal
Nirmal 2012-10-24
Thank you so much. That command definitely helped, i had two definition of that function. But when I did, get to definition it will take me to the one that I wanted to use but not to the one that it was actually using, which made me think I was using the right one. but that wasnt the case.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by