Lightsout
Lightsout

Reputation: 3757

Matlab coder unsupported functions

I'm trying to convert a piece of MATLAB code into C++ via MATLAB coder. Many of the functions in the MATLAB code like imread, imshow, normcorr2 are not supported by MATLAB coder.

What are some options to deal with this? Would it be possible to rewrite these functions using C++ and insert them via MEX file? Note I have very little experience with MATLAB, so I may be talking out of my rear.

Upvotes: 3

Views: 638

Answers (1)

Daniel
Daniel

Reputation: 36710

Your idea to provide C code to the coder is right, but mex does not work. Instead, you have to use coder.ceval.

Another option is coder.extrinsic, if you use it you tell the MATLAB coder not to generate code but rather call the function in MATLAB. If you do this, it obviously requires a MATLAB installation on the target system.

Upvotes: 1

Related Questions