matlab c++ data arrays to c++

조회 수: 1 (최근 30일)
MOHAMMED ALMANSOUR
MOHAMMED ALMANSOUR 2022년 2월 13일
답변: Akshat Dalal 2025년 5월 12일
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