matlab c++ data arrays to c++

3 次查看(过去 30 天)
MOHAMMED ALMANSOUR
MOHAMMED ALMANSOUR 2022-2-13
how i can transfer arrays that i save from matlab to call it and use it in c++ code
  3 个评论
MOHAMMED ALMANSOUR
MOHAMMED ALMANSOUR 2022-2-13
no its
x = exprnd(1,1,N);
then i save it im .mat file
can i use it in c++
i want this array to get some result in c++ code
Jan
Jan 2022-2-13
You can either write a Mex function to call the C++ routine directly without the indirection over the hard disk. Or you can save the data to a binary file using fopen/fwrite/fclose.

请先登录,再进行评论。

回答(1 个)

Akshat Dalal
Akshat Dalal 2025-5-12
Hi Mohammed,
There are a few different ways to achieve this as Jan mentioned. I would also suggest a few other ways:
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Call C++ from MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by