2009年2月22日星期日

C Mex files development and debug

development enviornment

/*
the matlab program are transfered to C files successfully. " that is *.m->*.c "
c mex are implemented with efficiency more 50 times more than matlab program

the development enviornment:
VC 6.0
Matlab 7.1

As a matter of fact, this is not a good development envoirnment assemble. Because the many function and toolbox can not be run under the enviornment. But they are on my hand.

the popular version are VC2005+matlab 2007b
*/

debug enviornment

/*
furthermore some techniques are need in debugging the C-mex function.
The following is the description of debug method. Although it is written
according to VC7.1, the test result of mine shows that it is usable under
VC6.0 enviornment


1.Start Microsoft Visual Studio Version 7.1 by typing at the DOS prompt
msdev filename.mexw32


2.In the Microsoft environment, from the Project menu, select Settings. In the window that opens, select the Debug tab. This options window contains edit boxes. In the edit box labeled Executable for debug session, enter the full path to where MATLAB resides. All other edit boxes should be empty.

3.Open the source files and set a break point on the desired line of code by right-clicking with your mouse on the line of code.

4.From the Build menu, select Debug, and click Go.

5.You will now be able to run your MEX-file in MATLAB and use the Microsoft debugging environment. For more information on how to debug in the Microsoft environment, see the Microsoft Development Studio or Microsoft Visual Studio documentation.

*/

没有评论:

发表评论