Main Content

Create a C MATLAB Production Server Client

To create a MATLAB® Production Server™ client:

  1. Obtain the client runtime files installed in $MPS_INSTALL/client/c.

  2. In consultation with the MATLAB programmer, agree on the MATLAB function signatures that comprise the services in the application.

  3. Configure your system with the appropriate software for working with C/C++.

  4. Initialize the MATLAB Production Server client runtime using mpsInitializeEx().

    mpsClientRuntime* mpsruntime = mpsInitializeEx(MPS_CLIENT_1_1);
  5. Create the client runtime configuration.

    See Configure the Client-Server Connection.

  6. Create the client runtime context.

    See Create the Client Runtime Context.

  7. Create the required MATLAB data for the inputs and outputs of the function.

    See Manage MATLAB Data in C/C++ Clients.

  8. Evaluate the MATLAB functions.

  9. Handle any errors.

    See Handle Function Processing Errors.

  10. Free system resources by cleaning up all MATLAB data and terminating the client connection.

    See Clean Up MATLAB Resources.

For a complete example of an implementing a C++ client, see Create a C++ Client.