MATLAB: How to call an EXE from a C-MEX S-function

executablesimulinkstandalone

How do I call an EXE from a C-MEX S-function ?
I am writing a C-MEX S-function, from which an EXE file is going to be called. But I do not know how to call a EXE from a C-MEX S-function. Is there any MATLAB API that does this?

Best Answer

There is no MATLAB API for calling a EXE. But you can use the "system" command which is a standard C function to call a EXE from a MEX file.