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,


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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.