1.下载libSVM工具包

http://pan.baidu.com/s/1bnGNTBT或者下载最新版的到http://www.csie.ntu.edu.tw/~cjlin/libsvm/

2.解压缩后放在matlab的toolbox目录下

如我的目录C:\Program Files\MATLAB\R2012a\toolbox\libsvm

3.打开matlab,matlab的菜单 File->Set Path->add with subfolders(可直接用Add Folder)里,把C:\Program Files\MATLAB\R2011a\toolbox\libsvm\matlab目录也添加进去

4.在matlab中输入mex –setup

>> mex -setup

Welcome to mex -setup.  This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html Please choose your compiler for building MEX-files: Would you like mex to locate installed compilers [y]/n? y Select a compiler:
[] Microsoft Visual C++ SP1 in C:\Program Files (x86)\Microsoft Visual Studio 9.0 [] None Compiler: Please verify your choices: Compiler: Microsoft Visual C++ SP1
Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0 Are these correct [y]/n? y ***************************************************************************
Warning: MEX-files generated using Microsoft Visual C++ require
that Microsoft Visual Studio run-time libraries be
available on the computer they are run on.
If you plan to redistribute your MEX-files to other MATLAB
users, be sure that they have the run-time libraries.
*************************************************************************** Trying to update options file: C:\Users\Wind\AppData\Roaming\MathWorks\MATLAB\R2012a\mexopts.bat
From template: C:\PROGRA~\MATLAB\R2012a\bin\win64\mexopts\msvc90opts.bat Done . . . **************************************************************************
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than ^- elements. In the near future
you will be required to update your code to utilize the new
API. You can find more information about this at:
http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html
Building with the -largeArrayDims option enables the new API.
**************************************************************************

不同的电脑因为安装的vc版本不同可能会出现不同的结果

5.在matlab current Floder中进入libSVM下的matlab路径

在matlab中输入make

如果顺利的话,可以正确编译

6.测试是否安装

>>[heart_scale_label,heart_scale_inst] =libsvmread('heart_scale');
>>model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07');

  *
  optimization finished, #iter = 134
  nu = 0.433785
  obj = -101.855060, rho = 0.426412
  nSV = 130, nBSV = 107
  Total nSV = 130

>>[predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); %

输出

Accuracy = 86.6667% (234/270) (classification)

证明已经配置完成

LibSvm添加到Matlab的更多相关文章

  1. 关于libsvm工具箱在64位matlab下的安装说明

    LIBSVM工具箱的安装 基本方法: 1.在网上下载LIBSVM工具箱. http://www.csie.ntu.edu.tw/~cjlin/libsvm/ 2.将LIBSVM工具箱所在目录添加到MA ...

  2. Libsvm的MATLAB调用和交叉验证

    今天听了一个师兄的讲课,才发现我一直在科研上特别差劲,主要表现在以下几个方面,(现在提出也为了督促自己在以后的学习工作道路上能够避免这些问题) 1.做事情总是有头无尾,致使知识点不能一次搞透,每次在用 ...

  3. libSVM在matlab下的使用安装

    1) 从LIBSVM的官网http://www.csie.ntu.edu.tw/~cjlin/libsvm/上下载最新版本的LIBSVM,当前版本为libsvm-3.18.zip 2) 解压压缩包到电 ...

  4. MATLAB 安装使用libsvm详细步骤

    根据本文后面部分博友提出的在配置过程中出现的问题,其中需要特别强调的一点:整个过程,都是在 libsvm-3.12\matlab目录下操作的.如果这一点你忽视了,你不可能解决配置中报的Bug,即使重新 ...

  5. Libsvm在matlab环境下使用指南

    一.安装 http://www.csie.ntu.edu.tw/~cjlin/libsvm/matlab/.在这个地址上可以下的包含matlab接口的源程序.下载完后可以放到放到任意的盘上解压,最好建 ...

  6. matlab配置Libsvm 防止备忘录

    1 首先我们要下载一个Libsvm 工具箱 其中,这一切都可以被下载到 2 我们解包 我解压在桌面上 住址C:\Users\Administrator\Desktop\libsvm 3打开matlab ...

  7. 在Matlab中安装使用libsvm详细步骤(附图)

    今天自己在matlab中安装libsvm,下面是详细的步骤 1.首先下载libsvmhttp://www.csie.ntu.edu.tw/~cjlin/libsvm/我的matlab版本 R2016a ...

  8. Matlab2012a下配置LibSVM—3.18

    1.下载最新版LibSVM 点击此处打开网页,点击zip file下载最新版的文件并解压放在任何目录下,建议放在安装目录便于查找.如我的文件解压在路径C:\ProgramFiles\MATLAB\R2 ...

  9. EMD分析 Matlab 精华总结 附开源工具箱(全)

    前言: 本贴写于2016年12与15日,UK.最近在学习EMD(Empirical Mode Decomposition)和HHT(Hilbert-Huang Transform)多分辨信号处理,FQ ...

随机推荐

  1. oracle获取时间毫秒数

    select (sysdate-to_date('1970-01-01','yyyy-mm-dd')-8/24)*24*60*60*1000-1* 60 * 60 * 1000  millisecon ...

  2. URL中的#号

    一.#的涵义 #代表网页中的一个位置.其右面的字符,就是该位置的标识符.比如, http://www.example.com/index.html#print 就代表网页index.html的prin ...

  3. Matlab、R向量与矩阵操作

    Matlab.R向量与矩阵操作   描    述 Matlab R 1 建立行向量v=[1 2  3 4] v=[1 2 3 4] v<-c(1,2,3,4)或v<-scan(),然后输入 ...

  4. 【web开发学习笔记】Structs2 Result学习笔记(一)简介

    Structs2 Result学习笔记(一)简介 问题一 <struts> <constant name="struts.devMode" value=" ...

  5. .net Lock用法(转)

    lock就是把一段代码定义为临界区,所谓临界区就是同一时刻只能有一个线程来操作临界区的代码,当一个线程位于代码的临界区时,另一个线程不能进入临界区,如果试图进入临界区,则只能一直等待(即被阻止),直到 ...

  6. Atitit.获得向上向下左的右的邻居的方法 软键盘的设计..

    Atitit.获得向上向下左的右的邻居的方法 软键盘的设计.. Left right可以直接使用next prev.. Up down可以使用pix 判断...获得next element的posit ...

  7. 关于Xilinx FPGA JTAG下载时菊花链路中的芯片数量

      关于Xilinx FPGA JTAG下载时菊花链路中的芯片数量 emesjx | 2014-08-13 13:13:30    阅读:1793   发布文章 当一个系统中含有多片(2片以上)Xil ...

  8. (初学者)安装hadoop集群注意事项

    1.关闭防火墙 2.所有的hadoop操作都是hadoop用户下面的,同时需要用hadoop用户登录之后,对于其他的机器的hadoop用户可以免密登录 3.hadoop用户在root组下面,不是附加组 ...

  9. iOS开发之删除过期Provisioning Profiles方法

    1.在finder下打开go -> go to folder输入: ~/Library/MobileDevice/Provisioning Profiles 2.查看上面的列表,依照时间顺序删除 ...

  10. kdump 的使用在linux崩溃时

    Centos7/RHEL7 开启kdump 翻译 2017年12月18日 16:58:28 标签: kernel / kdump / crash / centos 437 原文链接<How to ...