|
我安装好后,想调用SVMTrain.m中的function [AlphaY, SVs, Bias, Parameters, nSV, nLabel] = SVMTrain
(Samples, Labels, Parameters, Weight)命令,命令窗口如下
To get started, select MATLAB Help or Demos from the Help menu.
>> load('D:\Program Files\MATLAB71\work\my matlab.mat')
>> which SVMTrain.m
d:\Program Files\MATLAB71\toolbox\osu-svm\SVMTrain.m
>> whos
Name Size Bytes Class
Lables 1x20 160 double array
Parameters 1x11 88 double array
Samples 4x20 640 double array
Grand total is 111 elements using 888 bytes
>> [AlphaY, SVs, Bias, Parameters, nSV, nLabel] = SVMTrain(Samples, Labels, Parameters)
??? Undefined function or variable 'Labels'.
>> function [AlphaY, SVs, Bias, Parameters, nSV, nLabel] = SVMTrain(Samples, Labels, Parameters)
??? function [AlphaY, SVs, Bias, Parameters, nSV, nLabel] = SVMTrain(Samples, Labels, Parameters)
|
Error: Function definitions are not permitted at the prompt or in scripts.
通过which命令证明安装没问题,whos命令可见我载入的Samples, Labels, Parameters,但在调用命令一直不成功,我就是不明白斑竹说的保存m文件再调用命令的意思。初学者,见笑了。 |
|