If matlab coder fails can we still do it ourselves?
1 回表示 (過去 30 日間)
古いコメントを表示
Mohammad Shojaei Arani
2022 年 7 月 9 日
コメント済み: Mohammad Shojaei Arani
2022 年 7 月 9 日
Hello friends,
I have a simple question. As you know matlab coder cannot create mex functions always, for instance when the input type is a function handle or due to the presence of symbolic sdtuff. Let me define 'simple inputs' for the cases matlab coder works and 'complex inputs' when matlab coder fails due to the presence of one or more difficult input typpe. Now, consider the following code:
function f1 = func1 (Simple inputs)
A=func2(Complex inputs);
f1= something
end
Imagine I ask a friend to assist me with writing a C/C++ code for func2 (which matlab cannot). Then can I still run the func1 and replace func2 by its equivalent C/C++ mex one as in bellow?
function f1 = func1 (Simple inputs)
A=func2_mexx(Complex inputs);
f1= something
end
Thanks for your kind help in advance!
Babak
0 件のコメント
採用された回答
patrick1704
2022 年 7 月 9 日
編集済み: patrick1704
2022 年 7 月 9 日
Not sure if I completly understand your question, but you can naturally write a C/C++ function and code it to mex even without the Matlab coder. You just need program the proper interface and execute the mex command with the proper inputs manually.
Further information can be found here: Write C Functions Callable from MATLAB (MEX Files) - MATLAB & Simulink - MathWorks Deutschland
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Compiler についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!