MATLAB Answers

How I can use the matlab coder to convert my matlab code to C language? what is the MEX function can any body explain for me.

6 views (last 30 days)
Tasnim Nazzal
Tasnim Nazzal on 21 Jan 2020
Answered: Athul Prakash on 24 Jan 2020
How I can use the matlab coder to convert my matlab code to C language? what is the MEX function
can any body explain for me.
Thank you
Tasnim

  0 Comments

Sign in to comment.

Answers (1)

Athul Prakash
Athul Prakash on 24 Jan 2020
MEX files are like an interface between matlab and code written in C/C++ or FORTRAN. You can use the 'mex' command to compile source code from these languages into a mex file. After that, the mex file acts like any other matlab function and can be invoked from the command line or any script.
I recommend going through the Matlab documentation, especially try out the examples you may find there. You may start from here:
MATLAB Coder is used to generate C/C++ source code from any matlab script. You may invoke the 'codegen' command on any matlab script to start off. Once again, you may read the documentation or try this for a starting point:
Hope it Help!

  0 Comments

Sign in to comment.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by