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

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

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

問題描述

由于嚴重依賴模板,我需要用 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)形?)
主站蜘蛛池模板: 亚洲高清在线 | 日本人和亚洲人zjzjhd | 一级黄色片一级黄色片 | 最新91在线 | 国产伦精品一区二区三区高清 | 亚洲乱码一区二区三区在线观看 | 亚洲午夜精品 | 成人av网站在线观看 | 成人午夜精品 | 亚洲精品乱码久久久久久按摩 | 91久久夜色 | 激情欧美日韩一区二区 | 99精品视频在线观看 | 国产午夜精品一区二区三区嫩草 | 久久精品亚洲精品国产欧美 | 日韩中文字幕在线观看视频 | 亚洲综合色丁香婷婷六月图片 | 91在线观看 | 91色视频在线观看 | 亚洲欧美日韩一区二区 | 国产区精品 | 成人国产精品免费观看 | 爱爱免费视频 | 亚洲国产精品99久久久久久久久 | 五月天国产在线 | 美女人人操 | 国产一区二区在线免费视频 | 91亚洲一区 | 精品91av| 日本精品一区二区三区在线观看 | 亚洲精品久久久久久宅男 | 久久久久一区二区三区 | 在线视频日韩 | 日韩欧美国产一区二区 | 亚洲一区二区三区免费在线观看 | 欧美一区二区精品 | 国产欧美日韩在线播放 | 日韩中文字幕在线 | 成人在线视频网站 | 日本精品免费在线观看 | 精品乱码一区二区三四区视频 |