System Configuration: win7 flagship edition + MATLAB r2010a + visual studio2010
DebuggingCode: Http://www.cs.brown.edu /~ Pff/latent-release4/(release1)
1. SourceProgramThe. cpp file is called. Therefore, you must first set the Mex.
Http://xiaoqianaihuangten.blog.163.com/blog/static/191602033201211561656228/
Because MATLAB r2010a does not support the Visual Studio 2010 compiler, You need to download the patch.Vs2010mexsupp.zip.
Http://blog.csdn.net/weixingstudio/article/details/7886999
The specific decompress format is unzip (path_to_zip_file, Matlab root );
(Remember to enclose the file path in single quotes and add a file name) You can use unzip to directly decompress the file to the path where it should exist, without worrying about where to put the decompressed file.
2,The code can only be run on UNIX, Linux, or Mac, and can be run on windows with slight changes.
A. dt. CC: # define int32_t int
B. Add the following content to features. CC & resize. CC:
# Define bzero (a, B) memset (A, 0, B)
Int round (float a) {float TMP = A-(INT) A; If (TMP >= 0.5) Return (INT) A + 1; else return (INT) ;}
C. Resize. CC: alphainfo OFS [Len]; this sentence is changed to: alphainfo * OFS = new alphainfo [Len]; of course, delete [] OFS is added after the same scope;
After changing the above several points, you can run it. Run demo. m to check the effect.
From: http://blog.csdn.net/pozen/article/details/7023742
3. The next step is to understand the principles and debug several other versions.
Appendix: MATLAB calls the code http://blog.sina.com.cn/s/blog_468651400100coas.html under C through the Mex Interface