matlabcontrol
Class RemoteMatlabProxyController

java.lang.Object
  extended by matlabcontrol.RemoteMatlabProxyController

Deprecated.

@Deprecated
public class RemoteMatlabProxyController
extends java.lang.Object

This class is deprecated. It will be removed in a later release of matlabcontrol. Use of this class is strongly discouraged.

A convenience class that allows for controlling a single remote session of MATLAB without having to create a RemoteMatlabProxyFactory and then create a RemoteMatlabProxy.

Author:
Joshua Kaplan
See Also:
RemoteMatlabProxy

Method Summary
static void createConnection()
          Deprecated. Create a connection to MATLAB.
static void eval(java.lang.String command)
          Deprecated. Evaluates a command in MATLAB.
static void exit()
          Deprecated. Exits MATLAB.
static void feval(java.lang.String functionName, java.lang.Object[] args)
          Deprecated. Calls a MATLAB function with the name functionName.
static java.lang.Object getVariable(java.lang.String variableName)
          Deprecated. Gets the value of the variable named variableName from MATLAB.
static boolean isConnected()
          Deprecated. Returns whether or not this controller is connected to MATLAB.
static java.lang.Object returningEval(java.lang.String command, int returnCount)
          Deprecated. Evaluates a command in MATLAB.
static java.lang.Object returningFeval(java.lang.String functionName, java.lang.Object[] args)
          Deprecated. Calls a MATLAB function with the name functionName.
static java.lang.Object returningFeval(java.lang.String functionName, java.lang.Object[] args, int returnCount)
          Deprecated. Calls a MATLAB function with the name functionName.
static void setEchoEval(boolean echo)
          Deprecated. Allows for enabling a diagnostic mode that will show in MATLAB each time a Java method that calls into MATLAB is invoked.
static void setVariable(java.lang.String variableName, java.lang.Object value)
          Deprecated. Sets the variable to the given value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setVariable

public static void setVariable(java.lang.String variableName,
                               java.lang.Object value)
                        throws MatlabInvocationException
Deprecated. 
Sets the variable to the given value.

Parameters:
variableName -
value -
Throws:
MatlabInvocationException

getVariable

public static java.lang.Object getVariable(java.lang.String variableName)
                                    throws MatlabInvocationException
Deprecated. 
Gets the value of the variable named variableName from MATLAB.

Parameters:
variableName -
Returns:
value
Throws:
MatlabInvocationException

createConnection

public static void createConnection()
                             throws MatlabConnectionException
Deprecated. 
Create a connection to MATLAB. If a connection already exists this method will not do anything. This must be called before any methods that control MATLAB are called, or those methods will throw runtime exceptions.

Throws:
MatlabConnectionException

isConnected

public static boolean isConnected()
Deprecated. 
Returns whether or not this controller is connected to MATLAB.

Returns:
if connected to MATLAB

exit

public static void exit()
                 throws MatlabInvocationException
Deprecated. 
Exits MATLAB.

Throws:
MatlabInvocationException

eval

public static void eval(java.lang.String command)
                 throws MatlabInvocationException
Deprecated. 
Evaluates a command in MATLAB. The result of this command will not be returned.

This is equivalent to MATLAB's eval(['command']).

Parameters:
command - the command to be evaluated in MATLAB
Throws:
MatlabInvocationException
See Also:
returningEval(String, int)

returningEval

public static java.lang.Object returningEval(java.lang.String command,
                                             int returnCount)
                                      throws MatlabInvocationException
Deprecated. 
Evaluates a command in MATLAB. The result of this command can be returned.

This is equivalent to MATLAB's eval(['command']).

In order for the result of this command to be returned the number of arguments to be returned must be specified by returnCount. If the command you are evaluating is a MATLAB function you can determine the amount of arguments it returns by using the nargout function in the MATLAB Command Window. If it returns -1 that means the function returns a variable number of arguments based on what you pass in. In that case, you will need to manually determine the number of arguments returned. If the number of arguments returned differs from returnCount then either null or an empty String will be returned.

Parameters:
command - the command to be evaluated in MATLAB
returnCount - the number of arguments that will be returned from evaluating the command
Returns:
result of MATLAB eval
Throws:
MatlabInvocationException
See Also:
eval(String)

feval

public static void feval(java.lang.String functionName,
                         java.lang.Object[] args)
                  throws MatlabInvocationException
Deprecated. 
Calls a MATLAB function with the name functionName. Arguments to the function may be provided as args, if you wish to call the function with no arguments pass in null. The result of this command will not be returned.

The Objects in the array will be converted into MATLAB equivalents as appropriate. Importantly, this means that any String will be converted to a MATLAB char array, not a variable name.

Parameters:
functionName - name of the MATLAB function to call
args - the arguments to the function, null if none
Throws:
MatlabInvocationException
See Also:
returningFeval(String, Object[], int), returningFeval(String, Object[])

returningFeval

public static java.lang.Object returningFeval(java.lang.String functionName,
                                              java.lang.Object[] args)
                                       throws MatlabInvocationException
Deprecated. 
Calls a MATLAB function with the name functionName. Arguments to the function may be provided as args, if you wish to call the function with no arguments pass in null.

The Objects in the array will be converted into MATLAB equivalents as appropriate. Importantly, this means that any String will be converted to a MATLAB char array, not a variable name.

The result of this function can be returned. In order for a function's return data to be returned to MATLAB it is necessary to know how many arguments will be returned. This method will attempt to determine that automatically, but in the case where a function has a variable number of arguments returned it will only return one of them. To have all of them returned use returningFeval(String, Object[], int) and specify the number of arguments that will be returned.

Parameters:
functionName - name of the MATLAB function to call
args - the arguments to the function, null if none
Returns:
result of MATLAB function
Throws:
MatlabInvocationException
See Also:
feval(String, Object[]), returningFeval(String, Object[])

returningFeval

public static java.lang.Object returningFeval(java.lang.String functionName,
                                              java.lang.Object[] args,
                                              int returnCount)
                                       throws MatlabInvocationException
Deprecated. 
Calls a MATLAB function with the name functionName. Arguments to the function may be provided as args, if you wish to call the function with no arguments pass in null.

The Objects in the array will be converted into MATLAB equivalents as appropriate. Importantly, this means that any String will be converted to a MATLAB char array, not a variable name.

The result of this function can be returned. In order for the result of this function to be returned the number of arguments to be returned must be specified by returnCount. You can use the nargout function in the MATLAB Command Window to determine the number of arguments that will be returned. If nargout returns -1 that means the function returns a variable number of arguments based on what you pass in. In that case, you will need to manually determine the number of arguments returned. If the number of arguments returned differs from returnCount then either only some of the items will be returned or null will be returned.

Parameters:
functionName - name of the MATLAB function to call
args - the arguments to the function, null if none
returnCount - the number of arguments that will be returned from this function
Returns:
result of MATLAB function
Throws:
MatlabInvocationException
See Also:
feval(String, Object[]), returningFeval(String, Object[])

setEchoEval

public static void setEchoEval(boolean echo)
                        throws MatlabInvocationException
Deprecated. 
Allows for enabling a diagnostic mode that will show in MATLAB each time a Java method that calls into MATLAB is invoked.

Parameters:
echo -
Throws:
MatlabInvocationException