Main Content

Create a CMATLABProduction ServerClient

To create aMATLAB®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 theMATLAB Production Serverclient runtime usingmpsInitializeEx().

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

    SeeConfigure the Client-Server Connection.

  6. Create the client runtime context.

    SeeCreate the Client Runtime Context.

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

    SeeData Handling.

  8. Evaluate the MATLAB functions.

  9. Handle any errors.

    SeeHandle Function Processing Errors.

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

    SeeClean Up MATLAB Resources.

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