This section describes functions from file local/matlabeng.ct.
[...] = matlab_call(fname...)
[a,b,c,...] = matlab_call("fname",d,e,f,...)
calls a Matlab function in a currently running background
Matlab process. Input arguments (any number) d,e,f,...
are sent to Matlab prior to call, and output arguments
(any number) a,b,c,... are collected and returned to Tela
after the function has completed.
See also:
matlab_start
,
matlab_eval
,
matlab_put
,
matlab_get
.
Error codes:
1: Unknown error when sending input argument
2: Function call unsuccessful
3: Internal error: No such output argument in Matlab workspace
4: Output argument is of unsupported type (not double)
5: Output argument is of unsupported type (not full matrix)
-1: Internal error: matlab_put or matlab_get first argument not a string
-2: No Matlab process running, use matlab_start first
-3: Input argument not interpretable as a matrix
-4: Input argument has too high (> 2) rank
-5: First argument not a string
[retval] = matlab_eval(str)
matlab_eval("command") sends "command" to currently
running Matlab background process. It returns 1
if succesful 0 if an error occurred.
See also:
matlab_start
,
matlab_put
,
matlab_call
.
Error codes:
-1: Argument not a string
-2: No Matlab process running, use matlab_start first
[y] = matlab_get(name)
matlab_get("MatrixName") asks a currently running background
Matlab process for a variable named "MatrixName", and returns
its value.
See also:
matlab_start
,
matlab_put
,
matlab_eval
.
Error codes:
-1: Argument not a string
-2: No Matlab process running, use matlab_start first
3: No such variable in Matlab workspace
4: The variable is of unsupported type (not double)
5: The variable is of unsupported type (not full matrix)
[] = matlab_put(name,value)
matlab_put("MatrixName",x) tries to interpret x as
a Matlab matrix and sends it to currently running
background Matlab process. The matrix is assigned to
variable "MatrixName" in Matlab side.
matlab_put returns 1 if successful and 0 if not.
See also:
matlab_start
,
matlab_get
,
matlab_eval
.
Error codes:
1: Unknown error
-1: First argument not a string
-2: No Matlab process running, use matlab_start first
-3: Second argument not interpretable as a matrix
-4: Second argument has too high (> 2) rank
[] = matlab_start(;startcmd)
matlab_start() starts a new Matlab process on background.
You can send to it commands with matlab_eval.
matlab_start("startcmd") uses "startcmd" to start up
Matlab. The default "startcmd" is "matlab".
If matlab_start() has already been called, a new call
is harmless and does nothing.
See also:
matlab_eval
,
matlab_call
,
matlab_stop
.
Error codes:
1: Could not start Matlab
-1: Argument not a string
[] = matlab_stop()
matlab_stop() stops a currently running Matlab process.
See also:
matlab_start
,
matlab_eval
.
Error codes:
1: No Matlab process running; none to be stopped
2: Unknown error occurred when trying to stop Matlab process
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter