Preventing a MEX file from crashing in MATLAB

前端 未结 1 1355
粉色の甜心
粉色の甜心 2020-11-30 13:48

I have a MEX file which I \"borrowed\" from someone else to help me code a semi-automated nuclear detection algorithm. The problem is that the MEX file sporadically causes a

相关标签:
1条回答
  • 2020-11-30 14:03

    Which platform are you using? There are methods to help debug your MEX files. Whenever there is a segmentation fault, you can use an IDE to tell you where in the code it's crashing.

    Here are the directions for Mac OS: http://www.mathworks.com/help/matlab/matlab_external/debugging-on-mac-platforms.html

    Here are the directions for Linux: http://www.mathworks.com/help/matlab/matlab_external/debugging-on-linux-platforms.html

    Here are the directions for Windows: http://www.mathworks.com/help/matlab/matlab_external/debugging-on-microsoft-windows-platforms.html

    NB: I am against referring the OP to a link off-site to help with his or her question. I usually include most of the answer in my posts and provide links as references. Because you haven't told me what platform you're using, I will not write solutions for all platforms as that will take too much time. As such (and I'm praying that the links are stable for a long time), you can refer to the appropriate link for your platform.

    0 讨论(0)
提交回复
热议问题