Clear Filters
Clear Filters

how to run a c++ file in matlab using mex?

13 views (last 30 days)
sowjanya boddeti
sowjanya boddeti on 26 Feb 2016
Answered: James Tursa on 26 Feb 2016
compile cpp file from matlab. Is it : mex hello.cpp

Answers (1)

James Tursa
James Tursa on 26 Feb 2016
You need to have the gateway function mexFunction in your source code:
If you have that set up properly, and the file is in the current directory, then yes all you do is enter this at the command prompt:
mex hello.cpp

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!