1 First we want to download a LIBSVM toolbox where all this can be downloaded to
2 We unpacked my decompression on the desktop address C:\USERS\ADMINISTRATOR\DESKTOP\LIBSVM
3 Open MATLAB Navigation to the example in the following folder
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmdqxnjewmq==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center "height=" "width=" 731 ">4 we enter the following code according to this process
>>Mex-setup
Welcome to Mex-setup. This utility would help you set up
A default compiler. For a list of supported compilers, see
Http://www.mathworks.com/support/compilers/R2012b/win64.html
Choose your compiler for building mex-files:
Would you like the MEX to locate installed compilers [y]/n?N
Select a compiler:
[1] Intel C + + 12.0 (with Microsoft software development Kit (SDK) linker)
[2] Intel C + + 12.0 (with Microsoft Visual C + + SP1 linker)
[3] Intel C + + 12.0 (with Microsoft Visual C + + linker)
[4] Intel C + + 11.1 (with Microsoft Visual C + + SP1 linker)
[5] Intel Visual Fortran (with Microsoft software development Kit (SDK) linker)
[6] Intel visual Fortran 12.0 (with Microsoft Visual C + + SP1 linker)
[7] Intel visual Fortran 12.0 (with Microsoft Visual C + + Shell linker)
[8] Intel Visual Fortran 12.0 (with Microsoft Visual C + + linker)
[9] Intel visual Fortran 11.1 (with Microsoft Visual C + + SP1 linker)
Intel Visual Fortran 11.1 (with Microsoft Visual C + + Shell linker)
[One] Microsoft software development Kit (SDK) 7.1
[2005] Microsoft Visual C + + SP1
[] Microsoft Visual C + + SP1
Microsoft Visual C + + 2010
[0] None
Compiler: -
Your Machine has a Microsoft Visual C + + compiler located at
D:\VS2010 installation. Do you want to use this compiler [y]/n?y
Please verify your choices:
Compiler:microsoft Visual C + + 2010
LOCATION:D:\VS2010 Installation
is these correct [y]/n?y
***************************************************************************
Warning:mex-files generated using Microsoft Visual C + + require
That Microsoft Visual Studio run-time Libraries is
Available on the computer they is run on.
If you plan to redistribute your mex-files to other MATLAB
Users, being sure that they has the Run-time libraries.
***************************************************************************
Trying to update options File:c:\users\administrator\appdata\roaming\mathworks\matlab\r2012b\mexopts.bat
From Template:c:\progra~1\matlab\r2012b\bin\win64\mexopts\msvc100opts.bat
Done ...
**************************************************************************
warning:the matlab C and Fortran API have changed to support matlab
Variables with more than 2^32-1 elements. In the future
You'll be required-update your code to utilize the new
Api. You can find more information on:
Http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html
Building with THE-LARGEARRAYDIMS option enables the new API.
**************************************************************************
>> Make
>> Load Heart_scale.mat
>> model = Svmtrain (Heart_scale_label, Heart_scale_inst, '-C 1-g 0.07 ');
>> [Predict_label, accuracy, dec_values] = Svmpredict (Heart_scale_label, heart_scale_inst, model);
accuracy = 86.6667% (234/270) (classification)
Assuming that the data in the dataset can be loaded and displayed as seen in red, we're done. Configuration
Note that the installation of the absolute address of the directory as far as possible do not move or execute again when there may be an error ...
Note: The blue section is the last line of code that we need to manually enter in red for finally output
That's it. Other high-quality posts to see the MATLAB forum
1 http://www.ilovematlab.cn/thread-35262-1-1.html
2 http://www.ilovematlab.cn/thread-61234-1-1.html
3 http://www.ilovematlab.cn/thread-50032-1-1.html
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
MATLAB configuration LIBSVM Prevent memos