找回密码
 注册
关于网站域名变更的通知
查看: 379|回复: 1
打印 上一主题 下一主题

是不是在找Matlab的libsvm的安装过程呢?这篇就是哦!

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-7-1 16:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
以下是步骤:
4 t' Q% r* ?4 |>> mex -setup % 这是必须的+ m# P2 X9 W8 f9 N
Please choose your compiler for building external inteRFace (MEX) files: 2 F& X9 P3 h$ Z0 g' i

6 ?! b3 t" D0 jWould you like mex to locate installed compilers [y]/n? n %这次是选择编译器,输入n,因为你的是自定义的
; [% }6 t; \( U, @. l  }& z%出现下面的选项:
* r$ B5 ~; Q- T# F7 y( DSelect a compiler:
' i$ m1 `# [+ S: T/ Y0 `/ G, s[1] Borland C++ Compiler (free command line tools) 5.5 1 i- R& {& U9 M: R! L0 {
[2] Borland C++Builder 6.0 ( j6 k7 d* P3 C, [
[3] Borland C++Builder 5.0
$ f8 ]" N- _0 o[4] Compaq Visual Fortran 6.1
4 Q# s* [# }! ?, x8 S! L[5] Compaq Visual Fortran 6.6
3 Y7 P8 H. S+ e- p[6] Intel C++ 9.1 (with Microsoft Visual C++ 2005 linker)
/ T" Q+ ^7 h; J* s: G6 f% ]- f; n[7] Intel Visual Fortran 9.1 (with Microsoft Visual C++ 2005 linker) $ B/ p- x$ I# L6 e4 P- \* C0 @
[8] Intel Visual Fortran 9.0 (with Microsoft Visual C++ 2005 linker)
1 ^; z  I" \! X& p: Q: ?/ m  x[9] Intel Visual Fortran 9.0 (with Microsoft Visual C++ .NET 2003 linker)
" ]1 z7 L9 u5 ?, ~# S[10] Lcc-win32 C 2.4.1 9 o6 g, S. b3 [1 w
[11] Microsoft Visual C++ 6.0
2 j8 y) u1 c! ^& T5 t4 f[12] Microsoft Visual C++ .NET 2003 % i6 n) A1 w: C& p% S/ k# f
[13] Microsoft Visual C++ 2005 : W2 ^5 G+ V9 _6 T- \
[14] Microsoft Visual C++ 2005 Express Edition
  ?3 W2 ^2 T. C5 l# _[15] Open WATCOM C++ 1.3
" J0 b( z3 O* m+ b6 S$ s$ m* r$ j' d+ f4 w8 V1 e
[0] None , i: E9 {+ {/ q, E* r2 _
Compiler: 13%这次选择13,或许你也可以用其他的
0 S. u) a7 U" T6 WThe default location for Microsoft Visual C++ 2005 compilers is C:\Program Files\Microsoft Visual Studio 8,
) e' k$ S" |% u/ }1 q3 `2 _& Ibut that directory does not exist on this machine.  3 P% H0 ?- c5 J6 }! p9 Y8 Q
5 o; A6 x4 l7 f6 {5 k
Use C:\Program Files\Microsoft Visual Studio 8 anyway [y]/n? n %这次它说要使用默认的路径  继续选择n' G/ R% A* R" x+ p" U( ]9 `7 g
Please enter the location of your compiler: [C:\Program Files\Microsoft Visual Studio 8] %它的意思是让你输入编译器的位置,输入:D:\Program Files\Microsoft Visual Studio 8; E$ }2 }9 T& o, P; D. ~8 p
% 下面就是确认了
) ~) p1 f4 o$ APlease verify your choices: & `, e* P/ A5 V- {: N$ N
6 _, ^3 L! j& ]0 a: q: r
Compiler: Microsoft Visual C++ 2005  & z, y0 z! R( f: ?" y& \3 S+ f
Location: D:\Program Files\Microsoft Visual Studio 8
2 T6 |4 J4 v0 I% `& \! i4 P4 `2 @1 k6 t7 u
Are these correct?([y]/n): y8 s7 k& J9 ~0 W) |8 o( N; _
***************************************************************************
2 g4 Z: m/ G' M+ y9 i  Warning: MEX-files generated using Microsoft Visual C++ 2005 require
# m7 k9 I9 M0 X) E5 l6 \' P4 ~           that Microsoft Visual Studio 2005 run-time libraries be  
+ h5 ^4 u' h, a) Y           available on the computer they are run on. ' ?7 r* r9 I. V' N$ d
           If you plan to redistribute your MEX-files to other MATLAB / [) ~& b# W8 k
           users, be sure that they have the run-time libraries.
7 \7 B$ ?+ c1 ~: O0 |, ]. |           You can find more information about this at: 8 S5 Z  x4 U9 b' L

5 ?$ F6 b6 q) u*************************************************************************** & c" D( R$ h. S0 P4 D. @& ]

: q7 j8 K0 z8 nTrying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2007a\mexopts.bat 9 N" Z- e0 x+ G1 o/ `/ u) f
From template:              D:\PROGRA~2\MATLAB\R2007a\bin\win32\mexopts\msvc80opts.bat 0 N& h* W0 s9 v$ U7 ?

% ^( o& F7 s. G9 t3 r5 J" {' g+ ?Done . . . %   ok,done!' h+ S9 j' \1 N" M
>> make
5 e' S5 n9 r6 o( ^>> 7 T' T+ {3 R1 m
%至此彻底完成,
8 `& @- |+ ?9 x& u- B5 M0 b%以下是测试
7 z- i- P! H9 F>>load heart_scale.mat
( I) H% A, t& f5 q/ J6 y: I* ?5 |>>model = svmtrain(heart_scale_label, heart_scale_inst, '-c 1 -g 0.07');
/ h+ h& x2 A* H$ N" M; s>> [predict_label, accuracy, dec_values] = svmpredict(heart_scale_label, heart_scale_inst, model); %
+ q& Z- H) \4 O& w9 g! ?2 \" z4 w2 eAccuracy = 86.6667% (234/270) (classification)%  done. k; \9 t& _+ l; ?

该用户从未签到

2#
发表于 2020-7-1 16:57 | 只看该作者
嗯嗯,找到了,就是这篇,谢谢!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-7-26 09:44 , Processed in 0.093750 second(s), 23 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表