Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have my Matlab folder at a path, C:\Users\Cassie\Documents\matlab2010\bin. Whenever I need to run matlab, I double click the matlab application under bin folder at


In addition, most of time, I put all my programs inside this folder. I downloaded libsvm-3.12 to my window 7 pc. However, I have a hard to build the matlab interface. Here are my questions.

(1) Where should I put my libsvm-3.12 extracted folder ? Should I put it under bin folder or under my matlab2010 folder?

(2) I also downloaded Visual Studio C++ 2010 express and made my matlab to choose it as default C++ compiler. Then, I put the libsvm folder at toolbox folder as


I added the searching path in matlab by


After I run "make" command, it gave me error message as

 C:\USERS\CASSIE\DOCUME~1\MATLAB~4\BIN\MEX.PL: Error: 'libsvmread.c' not found.    

However, the libsvmread.c does exist at matlab folder at


I do not understand why matlab can not find the libsvmread.c file. Any one experiences the similar thing before ? How can I fix this problem ? Thank you very much,

share|improve this question

i had the same error of '...\BIN\MEX.PL: Error: 'libsvmread.c' not found.'

I navigated to the '...\libsvm-3.12\matlab' directory, in Matlab, and I was able to compile it.

(double-click in the 'Current Folder' window until you are inside the '...\libsvm-3.12\matlab' folder, or type the folder name into the 'Current Folder' bar at the top of Matlab.

Edit: FYI I was using Matlab 2012a

share|improve this answer
up vote 0 down vote accepted

I finally understand how to use libsvm matlab ROC tool on my pc. Here is the information of my pc:

(1) Window 7
(2) Matlab 2008a and Matlab2010

Resolution summery:
(1) Extract libsvm-3.12 package to anywhere you like.
(2) If you use window as I, skip the "make" command. Just copy everything under libsvm-3.12/libsvm-3.12/windows to your directory of Matlab. Ex, my matlab is at


Put everything there.
(3) Directly use them via your matlab prompt such as

>> [a,b] = libsvmread('heart-scale');

I shouldn't have to execute "make" or "mex -setup" at all. In addition, I need to put all files from libsvm-3.12/windows to my matlab folder directly. I hope some newbie as I can also benefit from my experience.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .