executing c++ code within matlab

4 Ansichten (letzte 30 Tage)
Gargi Srivastava
Gargi Srivastava am 23 Jun. 2017
Kommentiert: Griffin Polglaze am 26 Mär. 2020
i have a matlab function which consists of a call to c++ code present in the same directory. whenever i execute the function i get an error message: undefined function or variable 'cimgnbmap'.

Akzeptierte Antwort

Jan
Jan am 23 Jun. 2017
You cannot call a c++ file directly. At first you have to write a so called Mex-wrapper: this is the function "mexFunction", which is called as entry point. Then compile the file using the mex command.
  1 Kommentar
Griffin Polglaze
Griffin Polglaze am 26 Mär. 2020
after successfully compiling the c++ code in matlab, are you able to call it? If not, how are you supposed to access it in matlab?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Call C++ from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by