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

從 MATLAB 調(diào)用 C++ 代碼?

Call C++ code from MATLAB?(從 MATLAB 調(diào)用 C++ 代碼?)
本文介紹了從 MATLAB 調(diào)用 C++ 代碼?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

由于嚴重依賴模板,我需要用 C++ 編寫一些代碼.我想從 MATLAB 調(diào)用這段代碼:基本上,我需要將一些參數(shù)傳遞給 C++ 代碼,并讓 C++ 代碼向 MATLAB 返回一個矩陣.我聽說這可以通過名為 MEX 的文件實現(xiàn),我仍在研究.但是我不確定這些 MEX 文件支持什么.全部是 C++(例如 STL 和 Boost) 支持嗎?有多難?

I have some code which I need to code in C++ due to heavy reliance on templates. I want to call this code from MATLAB: basically, I need to pass some parameters to the C++ code, and have the C++ code return a matrix to MATLAB. I have heard this is possible with something called a MEX file which I am still looking into. However I am not sure what is supported in these MEX files. Is all of C++ (e.g. STL and Boost) supported? How difficult is it?

我不需要任何共享庫,只需要像 shared_ptr 這樣的頭文件.

I don't need any shared libraries, just header-only stuff like shared_ptr.

推薦答案

查看 MEX 文件指南,尤其是 C++ 的第 25-27 節(jié).基本的STL/Boost 數(shù)據(jù)結(jié)構(gòu)應(yīng)該可以工作,但使用 Boost 進行線程處理可能會出現(xiàn)問題.
cout 在 C++ 中不會按預(yù)期工作,必須使用 mexPrintf 代替.

Have a look at the MEX-files Guide, especially Section 25–27 for C++. The basic STL/Boost data structures should work, but threading with Boost could be a problem.
cout will not work as expected in C++, mexPrintf has to be used instead.

這篇關(guān)于從 MATLAB 調(diào)用 C++ 代碼?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)形?)
主站蜘蛛池模板: 野狼在线社区2017入口 | 亚洲午夜网 | 欧美福利| 中文字幕亚洲视频 | 亚洲视频在线播放 | 亚洲精品一区二区三区在线 | 亚洲综合视频 | 草久久免费视频 | 拍真实国产伦偷精品 | 久久ww| 91新视频| 欧美视频一区二区三区 | 欧洲一区二区三区 | 99久久精品免费看国产高清 | 特黄色一级毛片 | 国产激情亚洲 | 精精精精xxxx免费视频 | www.日韩 | 盗摄精品av一区二区三区 | 久久精品国产一区二区电影 | 精品国产一区二区三区久久 | 国产一级免费视频 | 2018国产大陆天天弄 | 密室大逃脱第六季大神版在线观看 | 免费欧美 | 亚洲精品无 | www狠狠爱com | 欧美成人激情视频 | av免费网站在线观看 | 久久青青| 欧美99| 亚洲视频欧美视频 | 九九久久精品 | 啪啪精品| 激情的网站| 亚洲精品av在线 | 中文字幕在线免费 | 精品国产一区一区二区三亚瑟 | 欧美日韩中文在线 | 狠狠干av| 国产一区二区三区在线免费 |