久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

防止 MEX 文件在 MATLAB 中崩潰

Preventing a MEX file from crashing in MATLAB(防止 MEX 文件在 MATLAB 中崩潰)
本文介紹了防止 MEX 文件在 MATLAB 中崩潰的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個 MEX 文件,我從其他人那里借用"了它來幫助我編寫半自動核檢測算法.問題是 MEX 文件偶爾會導致分段錯誤.但是,如果第二次使用相同的參數運行代碼,那就沒問題了.

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 segmentation fault. However, if the code is run with the same parameters a second time, it's fine.

我希望有一種用于 MEX 文件的 try/catch 習慣用法,但是在我星期六的大部分時間都在尋找某些東西之后,我什么也沒找到.

I was hoping there was a sort of try/catch idiom for MEX files, but after spending most of my Saturday looking for something, I couldn't find anything.

對這個問題的任何幫助都會很棒!否則,我將不得不將 .cpp 移植到 MATLAB(它大約有 10,000 行,使用數百個依賴項 :-().

Any help on this issue would be amazing! Otherwise, I am going to have to port the .cpp into MATLAB (and it's around 10,000 lines using hundreds of dependencies :-().

推薦答案

您使用的是哪個平臺?有一些方法可以幫助調試您的 MEX 文件.每當出現分段錯誤時,您都可以使用 IDE 來告訴您它在代碼中崩潰的位置.

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.

Mac OS 的說明如下:http://www.mathworks.com/help/matlab/matlab_external/debugging-on-mac-platforms.html

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

以下是 Linux 的說明:http://www.mathworks.com/help/matlab/matlab_external/debugging-on-linux-platforms.html

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

以下是 Windows 的說明:http://www.mathworks.com/help/matlab/matlab_external/debugging-on-microsoft-windows-platforms.html

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

注意:反對將 OP 引向場外鏈接以幫助解決他或她的問題.我通常在我的帖子中包含大部分答案,并提供鏈接作為參考.因為您沒有告訴我您使用的是什么平臺,所以我不會為所有平臺編寫解決方案,因為這會花費太多時間.因此(我祈禱鏈接能長期穩定),您可以參考適合您平臺的鏈接.

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.

這篇關于防止 MEX 文件在 MATLAB 中崩潰的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數據?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環: for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環?)
Reusing thread in loop c++(在循環 C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環形?)
主站蜘蛛池模板: 久久精品国产亚洲一区二区三区 | 少妇精品久久久久久久久久 | 亚洲一区自拍 | 在线观看成人小视频 | 视频一区中文字幕 | 国产精品不卡一区 | 久草精品视频 | 欧美一级片在线看 | 精品中文字幕在线观看 | 国产精品日日做人人爱 | 久久久久久久久久久久久九 | 久久aⅴ乱码一区二区三区 亚洲国产成人精品久久久国产成人一区 | 国产免费一区二区 | 午夜欧美一区二区三区在线播放 | 91视频国产精品 | 国产黄视频在线播放 | 亚洲成人中文字幕 | 91视频一区二区三区 | 国产一区亚洲二区三区 | 国产精品自产拍在线观看蜜 | 一区二区三区视频 | 99视频在线免费观看 | www.一区二区三区.com | 亚洲 日本 欧美 中文幕 | 国产精品久久精品 | 求毛片| 盗摄精品av一区二区三区 | 久久久久久久久91 | 波多野结衣先锋影音 | h视频在线观看免费 | 日韩精品一区二区三区在线观看 | 一区二区在线不卡 | 国产精品福利在线 | 亚洲444eee在线观看 | 久久99深爱久久99精品 | 欧美8一10sex性hd | 亚洲精品久久久久久久久久久 | 欧美一级做性受免费大片免费 | 国产一级电影网 | 国产馆 | 91视频一88av|