Start the Connector

The MATLAB® Connector™ software enables remote access to a MATLAB session on your computer from a mobile device. The software is installed automatically with MATLAB.

To start the MATLAB Connector, use this command:

connector on

The first time that you run this command, the connector requests a password. Passwords can contain letters and numbers and must contain at least five characters. The maximum length is 32 characters. When you set up the MATLAB Mobile™ application on your device, specify the same password.

    Note:   If your firewall or antivirus software requests your permission, you must allow the connection for MATLAB Mobile to work. For more information, see Troubleshooting Desktop Connections. Also note that MATLAB Mobile and MATLAB Connector are intended for use behind a firewall on a private network. If you plan to use MATLAB Mobile and MATLAB Connector over the public Internet, via 3G, or via 4G, it is recommended you use a Virtual Private Network (VPN).

When you finish using the MATLAB Mobile application, close access to your MATLAB session with the command

connector off

To change your password, turn the connector off, and use the command

connector on mypassword

where mypassword is the new password you want to use. MATLAB stores your password with your preferences.

    Tip   To enable the connector automatically whenever MATLAB runs on your computer, modify or create a startup.m file to turn the connector on. The startup.m file must reside in your MATLAB startup folder.

Set the Port When 31415 Is Unavailable

By default, MATLAB Connector uses port 31415, which is usually available on most systems. If the default port is unavailable when you start the connector, the connector increments the port number by one until it finds an available port. To check which port the connector is using, start the connector and look at the URL it displays for the test link.

You can also specify a port when you start the connector. To change the port, start the connector using this command:

connector ('on','port',port_number)
You must set the port number every time you start the connector if you are not using the provided port.

The port number must match the port in the corresponding MATLAB Mobile connection. For information on specifying the port in MATLAB Mobile, see Configure MATLAB Mobile to Connect to Your Computer.

Was this topic helpful?