mphlaunch
Launch COMSOL Desktop, connect it to the running server, and import an application.
Syntax
mphlaunch
mphlaunch(model)
mphlaunch ModelTag
mphlaunch(..., timeout)
Description
mphlaunch launches a COMSOL Multiphysics Client and connect it to the same server as MATLAB® is connected to. Then it imports the model on the server into the COMSOL Multiphysics Client.
mphlaunch(model) does the same as above, but uses the model argument to select which model is imported.
mphlaunch ModelTag uses the model with the tag 'ModelTag' in the server to be imported. This can also be done using the syntax: mphlaunch('ModelTag')
mphlaunch(..., tms) uses the timeout tms (in milliseconds) to force MATLAB to wait until the COMSOL server is free again. The default timeout value is 500. A negative value results in no timeout.
Example
Load the file model_tutorial_llmatlab.mph:
model = mphopen('model_tutorial_llmatlab');
Launch a COMSOL Multiphysics Client, connect it with the running server, import the model defined as model:, and set a timeout of 1 s:
mphlaunch(model,1000);