Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matlab coder unsupported functions

Tags:

c++

matlab

mex

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.

like image 259
bakalolo Avatar asked Apr 25 '26 06:04

bakalolo


1 Answers

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.

like image 85
Daniel Avatar answered Apr 26 '26 19:04

Daniel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!