An Efficient Projection for l1,∞ Regularization该文提供代码,在Readme文件中说To run the projection in Matlab, you first need to compile the mexfile:
$ mex -output projL1Inf mex-projL1Inf.c 
Then, from Matlab, test the projection by running the script "runprojection", 

(1)在我笔记本电脑,打开matlab,打开该程序所在的文件夹,在matlab命令行输入mex -setup,matlab输出:Would you like mex to locate installed compilers [y]/n? 手动输入:y ,matlab输出: 
Select a compiler:  手动输入:1, matlab输出: Are these correct [y]/n?   手动输入:y 。手动输入: mex -output projL1Inf mex-projL1Inf.c ,可能是因为我的笔记本电脑没装VC,有错误。在我本机要能运行,关键就是生成projL1Inf.mexw32这个文件就可以了,在Mingming Gong电脑上生成,拷贝到我的电脑就可以了。 Mingming电脑装VC了,但还是不能编译,他讲可能原因是这个c语言代码本来就是在linux下写的,在windows上跑不了,naiyang也这么说。20121023, after Mingming Gong saw my blog, he found the solution to produce the file projL1Inf.mexw32. 只要将mex-projL1Inf.c后缀改为mex-projL1Inf.cpp,projL1Inf.c后缀改为projL1Inf.cpp,mex-projL1Inf.cpp第39行改为#include "projL1Inf.cpp",只要修改这三点就可以在windows下编译,我已经从他那里拷贝了projL1Inf.mexw32 。从我本机还是不能编译,因为本机没装VC。因:*.cpp是支持C和C++的;*.c只支持C,故//不支持。在Linux下C和C++是两个编译器(在linux下c是用gcc编译,C++使用g++编译),在windows下,C和C++是可以同时用VC编译的。

20130629在NLPR的54服务器用mex -output projL1Inf mex-projL1Inf.cpp成功编译生成文件projL1Inf.mexw64,不知为什么用mex -setup一步一步来不行。

(2)在uts cluster,按照上面输入的命令,有错误和警告 (Mingming said that the warning does not matter)
Warning: You are using gcc version "4.4.6".  The version
         currently supported with MEX is "4.3.4". 
错误:projL1Inf.c:248: error: expected expression before '/' token
projL1Inf.c:250: error: expected expression before '/' token
projL1Inf.c:252: error: expected expression before '/' token
打开projL1Inf.c ,将这三行的注释//,均换成/* * / 
这样的作用,就是生成projL1Inf.mexa64这个文件.如果用命令mex mex-projL1Inf.c,就是生成mex-projL1Inf.mexa64 (已经实践,将原始 projL1Inf.mexa64 删除,用命令mex mex-projL1Inf.c,就是生成mex-projL1Inf.mexa64, 再将这个文件改名为projL1Inf.mexa64,再运行runprojection 还是可以的)

20121208在uts服务器编译libsvm-mat-2.9-1,编译有问题,根据提示,将所有文件*.c都变成*.cpp,还有问题g++: svm.obj: No such file or directory,上网搜索解决方案http://blog.csdn.net/kit_147/article/details/7417734,将文件svm.obj改为svm.o,编译就没有问题了,但用程序测试还有问题,提示 "-largeArrayDims"的问题,make.m开始注释:% add -largeArrayDims on 64-bit machines,问mingming gong怎么add?将makefile中的mex...修改为mex...-largeArrayDims即可。例如
mex -O -c svm.cpp 
mex -O -c svm_model_matlab.c 
修改为
mex -O -c svm.cpp -largeArrayDims
mex -O -c svm_model_matlab.c -largeArrayDims
(This is with Mingming Gong's help)

20150710在跑FastHash提示错误:binaryTreeTrain1.mexw64不是有效的w32应用程序,感到费解,这是64位机,怎么会提示这个错误。Jian Liang讲重新编译下就行了,他就在matlab窗口敲入mex binaryTreeTrain1.cpp,再敲入mex forestInds.cpp就可以了