What does this error mean? I thought the argument was double

2 views (last 30 days)
>> svmStruct = svmtrain(m,groups,'ShowPlot',true);
Undefined function 'svmtrain' for input arguments of type 'double'.
  6 Comments
Geoff Hayes
Geoff Hayes on 7 May 2014
Habibu - I get the same error (as the above) since I don't have the Statistics Toolbox. As the cyclist asks below, what does which svmtrain return?
Habibu
Habibu on 8 May 2014
Geoff, I have statistics toolbox as part of student license. I have fixed it the issue was related to license.

Sign in to comment.

Answers (2)

the cyclist
the cyclist on 7 May 2014
The code you posted in the comment worked without error for me.
What do you get if you type
which svmtrain
?
  4 Comments
the cyclist
the cyclist on 7 May 2014
I'm guessing that that is the answer. On my machine (a Mac), it is
/Applications/MATLAB_R2014a.app/toolbox/stats/stats/svmtrain.m
From peeking at this page of old Release notes, it looks to me that SVM was introduced into the Statistics Toolbox in version 2013a (and was formerly in the Bioinformatics Toolbox).
Habibu
Habibu on 8 May 2014
Thanks guys it was license issues. MATLAB was pointing to coursera MATLAB license instead of my student license. I did the following to get it fixed. 1) uninstalled MATLAB 2) deleted all files related to MATLAB. 3) restarted my laptop 4) re-installed MATLAB
Once again thanks for your continued help.

Sign in to comment.


Nguyen Duc Duy
Nguyen Duc Duy on 3 Sep 2019
Maybe you need to change the function.
Machine Learning
svmtrain and svmclassify have been removed
The svmtrain and svmclassify functions have been removed. Use the fitcsvm function and the predict function of ClassificationSVM instead.
To update your code, replace all instances of svmtrain with fitcsvm, and replace all instances of svmclassify with predict. For more details, see the Compatibility Considerations sections of svmtrain and svmclassify.
  1 Comment
Rik
Rik on 3 Sep 2019
Since this question was posted in 2014, I doubt this was the sollution back then.

Sign in to comment.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!