错误一:
>> modelw = svmstrain(wine_label,wine_data);
Undefined function 'svmstrain' for input arguments of type
'double'. (错误原因-->svmtain打错为svmstrain)
错误二:
>> load heart_scale
Error using load
Unable to read file 'heart_scale': no such file or directory.
我前天安装的时候,这条语句还正常,怎么今天用,就出来这么个错误呢
>> modelw = svmtrain(wine_label,wine_data);
Error using svmtrain (line 233)
Y must be a vector or a character array.
这是因为libsvm的路径未设置正确
解决方法:
1.点击Matlab左上角的file,选择set path
2.在弹出的选项框中,选择第二个选项And with Subfolders
3.找到你的libsvm文件夹,点确定
4.点击save,关闭set path
OK