Constructor MexFunction with parameters

1 回表示 (過去 30 日間)
Xiangyu Zhang
Xiangyu Zhang 2019 年 9 月 23 日
Hi guys,
I am using MATLAB with C++ mex code for research. I know we can override constructor and deconstructor in MexFunction (see here). However, I want to initilize the MexFunction() object with parameters, e.g.:
MexFunction(int initial_seed) {
gen.seed(initial_seed);
std::cout << "MexFunction: Initializaing RNG produced:" << gen() << std::endl;
}
Is it possible to implement such function? If not, any work around?
Thanks!

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by