Invoke MATLAB Functions that Return Zero Outputs

The connection between a Python® client and a MATLAB® Production Server™ instance is encapsulated in a matlab.production_server.client.MWHttpClient object. You invoke MATLAB functions directly using the client connection object.

void = my_client.archive_name.function_name(in_args, nargout=0)
  • my_client — Name of client connection object

  • archive_name — Name of the deployable archive hosting the function

  • function_name — Name of the function to invoke

  • in_args — Comma-separated list of input arguments

For example, to invoke the MATLAB function mutate(m1, m2, m3) from the deployable archive mutations, you use this code:

import matlab
from production_server import client

my_client = client.MWHttpClient("http:\\localhost:9910")

m1 = matlab.double(...)
m2 = matlab.double(...)
m3 = matlab.double(...)

my_client.mutations.mutate(m1,m2,m3)

Related Topics

Was this topic helpful?