Class MatlabEngine


  • public class MatlabEngine
    extends java.lang.Object
    • Field Detail

      • engine

        protected java.lang.Object engine
      • getVariableMethod

        protected java.lang.reflect.Method getVariableMethod
      • getVariableAsyncMethod

        protected java.lang.reflect.Method getVariableAsyncMethod
      • putVariableMethod

        protected java.lang.reflect.Method putVariableMethod
      • putVariableAsyncMethod

        protected java.lang.reflect.Method putVariableAsyncMethod
      • evalMethod

        protected java.lang.reflect.Method evalMethod
      • evalAsyncMethod

        protected java.lang.reflect.Method evalAsyncMethod
      • fevalMethod

        protected java.lang.reflect.Method fevalMethod
      • fevalWithVariableOutputsMethod

        protected java.lang.reflect.Method fevalWithVariableOutputsMethod
      • fevalAsyncMethod

        protected java.lang.reflect.Method fevalAsyncMethod
      • closeMethod

        protected java.lang.reflect.Method closeMethod
      • quitMethod

        protected java.lang.reflect.Method quitMethod
      • disconnectMethod

        protected java.lang.reflect.Method disconnectMethod
      • project

        protected java.lang.String project
      • evalCommandQueue

        protected java.lang.StringBuilder evalCommandQueue
      • tryCatchEnabled

        protected java.lang.Boolean tryCatchEnabled
      • sb

        protected java.lang.StringBuilder sb
    • Constructor Detail

      • MatlabEngine

        public MatlabEngine()
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • MatlabEngine

        public MatlabEngine​(java.lang.Object engine)
    • Method Detail

      • isDisconnected

        public boolean isDisconnected()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getStopWatch

        public Stopwatch getStopWatch()
        Returns:
        the stopWatch
      • setEngineClass

        public static void setEngineClass​(java.lang.Class<?> matlabEngineClass)
      • trackApi

        public void trackApi​(boolean track)
      • getStream

        public java.lang.StringBuilder getStream()
      • getProject

        public java.lang.String getProject()
      • enableTryCatch

        public void enableTryCatch​(boolean enableTryCatch)
      • isTryCatchEnabled

        public java.lang.Boolean isTryCatchEnabled()
      • evalWithSetupAndResult

        public java.lang.Object evalWithSetupAndResult​(java.lang.String setup,
                                                       java.lang.String cmd,
                                                       java.lang.Object... parameters)
                                                throws MatlabException
        Throws:
        MatlabException
      • evalWithResult

        public java.lang.Object evalWithResult​(java.lang.String cmd,
                                               java.lang.Object... parameters)
                                        throws MatlabException
        Throws:
        MatlabException
      • eval

        public void eval​(java.lang.String cmd,
                         java.lang.Object... parameters)
                  throws MatlabException
        This method is now lazily executed. All commands are stored in a queue and are only dispatched when the method flush() is invoked.
        Parameters:
        cmd -
        parameters -
        Throws:
        MatlabException
      • is

        public static boolean is​(java.lang.Object obj)
      • getMatlabClass

        protected static java.lang.Class<?> getMatlabClass()
      • processInputObject

        protected java.lang.Object processInputObject​(java.lang.Object o)
      • processInputObject

        protected java.lang.Object[] processInputObject​(java.lang.Object[] objects)
      • resetTimer

        public void resetTimer()
      • fevalWithResult

        public java.lang.Object fevalWithResult​(int numberOfOutputs,
                                                java.lang.String function,
                                                java.lang.Object... handles)
                                         throws MatlabException
        Throws:
        MatlabException
      • feval

        public void feval​(int numberOfOutputs,
                          java.lang.String function,
                          java.lang.Object... handles)
                   throws MatlabException
        Throws:
        MatlabException
      • fevalWithResult

        public java.lang.Object fevalWithResult​(java.lang.String function,
                                                java.lang.Object... handles)
                                         throws MatlabException
        Throws:
        MatlabException
      • flush

        public void flush()
                   throws MatlabException
        Executes all commands to be executed in the eval method that have been stored in a queue.
        Throws:
        MatlabException
      • isEvalCommandQueueEmpty

        public boolean isEvalCommandQueueEmpty()
      • setReduceExchanges

        public void setReduceExchanges​(boolean reduceExchanges)
        Parameters:
        reduceExchanges -
      • isReduceExchanges

        public boolean isReduceExchanges()