Learn R Programming

R.matlab (version 1.1.3)

startServer.Matlab: Static method which starts a Matlab server

Description

Static method which starts a Matlab server on the local machine. Note that Matlab v6 or later is required, since the Matlab server relies on Java.

Usage

Matlab$startServer(matlab=getOption("matlab"), port=9999, minimize=TRUE, options=c("nodesktop", "nodisplay", "nosplash"), ...)

Arguments

matlab
An optional character string specifying the name of the matlab command, if different from "matlab". An absolute path are possible.
port
An optional integer in [1023,65535]. If given, the environment variable MATLABSERVER_PORT is set specifying which port the Matlab server should listen to for clients trying to c
minimize
When starting Matlab on Windows, it is always opened in a new window (see 1. The Matlab server running in Matlab). If this argument is
options
A character vector of options used to call the Matlab application.
...
Not used.

Value

  • Returns nothing.

synopsis

startServer.Matlab(this, matlab=getOption("matlab"), port=9999, minimize=TRUE, options=c("nodesktop", "nodisplay", "nosplash"), ...)

Details

This method is currently supported on Windows and Unix systems. Other systems are untested, but might work anyway. Note that this method will return immediately upon calling system() internally, i.e. you will not receive a return value telling wether Matlab was successfully started or not. To specify the full path to the matlab software set the matlab option, e.g. options(matlab="/opt/bin/matlab6.1"). If no such option exists, the value "matlab" will be used. The Matlab server relies on two files: 1) MatlabServer.m and 2) InputStreamByteWrapper.class (from InputStreamByteWrapper.java). These files exists in the externals/ directory of this package. However, if they do not exist in the current directory, which is the directory where Matlab is started, copies of them will automatically be made.

See Also

For more information see Matlab.