To enable remote access to a MATLAB® session on your computer at any time, use the command:
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
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.
Set the Port When 31415 Is Unavailable
By default, MATLAB Connector uses port 31415, which is usually available on most systems. If you know that your system uses this port for another application, specify a different port when you start the connector.
If you are using R2013a or later, set the port number every time you start the connector. To change the port, start the connector using this command:
If you are using R2012b or earlier, edit the connector-config.xml file. For example, open this file in the MATLAB Editor:
edit(fullfile(matlabroot, 'toolbox', ... 'connector','connector','connector-config.xml'))
Replace 31415 with your port number, and save the file.
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.