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

防止 MEX 文件在 MATLAB 中崩潰

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

問題描述

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

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 習(xí)慣用法,但是在我星期六的大部分時間都在尋找某些東西之后,我什么也沒找到.

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 行,使用數(shù)百個依賴項 :-().

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 :-().

推薦答案

您使用的是哪個平臺?有一些方法可以幫助調(diào)試您的 MEX 文件.每當(dāng)出現(xiàn)分段錯誤時,您都可以使用 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 引向場外鏈接以幫助解決他或她的問題.我通常在我的帖子中包含大部分答案,并提供鏈接作為參考.因為您沒有告訴我您使用的是什么平臺,所以我不會為所有平臺編寫解決方案,因為這會花費太多時間.因此(我祈禱鏈接能長期穩(wěn)定),您可以參考適合您平臺的鏈接.

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.

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

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

相關(guān)文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數(shù)據(jù)?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環(huán): for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環(huán)?)
Reusing thread in loop c++(在循環(huán) C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環(huán)形?)
主站蜘蛛池模板: av网站推荐 | 久久久久国产一区二区三区 | 亚洲精品在线免费观看视频 | 999久久久国产精品 欧美成人h版在线观看 | 日韩精品一区在线观看 | 在线观看中文字幕一区二区 | 久久久一二三区 | 日韩精品999 | 欧美黑人体内she精在线观看 | 亚洲天堂精品久久 | 欧美日韩国产精品一区 | 天堂在线1 | 欧美久久久久久久久 | 久久精品成人热国产成 | 亚洲日本一区二区 | 亚洲电影免费 | 中文在线播放 | 日韩欧美在线观看 | 亚洲欧美综合精品久久成人 | 亚洲首页| 成人午夜免费在线视频 | 成人免费看黄 | 91精品国产色综合久久 | 精品久久久网站 | www.精品国产 | 久久久久国产一区二区三区 | 亚洲免费在线观看av | 777777777亚洲妇女| 激情网站 | av电影手机版 | 一区二区三区在线免费观看 | 91社区在线观看播放 | 国产精品视频在线免费观看 | 四虎影院免费在线 | 在线观看av网站 | 国产乱码精品1区2区3区 | 99精品免费| 久久久国产一区二区三区四区小说 | 激情五月综合 | 国产亚洲精品成人av久久ww | 久久不射网|