Class MatlabEngineUtil

java.lang.Object
org.eclipse.epsilon.emc.simulink.util.MatlabEngineUtil

public class MatlabEngineUtil extends Object
  • Constructor Details

    • MatlabEngineUtil

      public MatlabEngineUtil()
  • Method Details

    • resolvePaths

      public static String[] resolvePaths() throws IllegalStateException, IllegalArgumentException
      Convenience method providing an array of length 3 with the required paths.
      Returns:
      {#PROPERTY_MATLAB_PATH, #PROPERTY_LIBRARY_PATH, #PROPERTY_ENGINE_JAR_PATH}
      Throws:
      IllegalStateException
      IllegalArgumentException
      Since:
      1.6
      See Also:
    • resolvePaths

      public static void resolvePaths(String[] currentPaths) throws IllegalStateException, IllegalArgumentException
      Resolves paths. The array is only written to if this method succeeds.
      Parameters:
      currentPaths - Contains the paths to determine in the following order:
      - #PROPERTY_MATLAB_PATH - #PROPERTY_LIBRARY_PATH - #PROPERTY_ENGINE_JAR_PATH
      Throws:
      IllegalArgumentException - If the paths array is null or not length 3.
      IllegalStateException - If the paths couldn't be resolved.
      Since:
      1.6
    • getLibraryPathFromRoot

      public static String getLibraryPathFromRoot(String matlabPath)
    • getEngineJarPathFromRoot

      public static String getEngineJarPathFromRoot(String matlabPath)
    • getLibraryPathFromEnv

      public static String getLibraryPathFromEnv()
    • getEngineJarPathFromEnv

      public static String getEngineJarPathFromEnv()
    • getMatlabPathFromEnv

      public static String getMatlabPathFromEnv()
    • matlabArrayToList

      public static List<Double> matlabArrayToList(double[] value)
    • matlabArrayToList

      public static List<Long> matlabArrayToList(long[] value)
    • matlabArrayToList

      public static List<Integer> matlabArrayToList(int[] value)
    • matlabArrayToList

      public static List<Float> matlabArrayToList(float[] value)
    • matlabArrayToList

      public static List<Boolean> matlabArrayToList(boolean[] value)
    • matlabArrayToList

      public static List<Byte> matlabArrayToList(byte[] value)
    • matlabArrayToList

      public static List<Short> matlabArrayToList(short[] value)
    • matlabArrayToList

      public static <T> List<T> matlabArrayToList(Object[] value)
    • parseMatlabEngineVariable

      public static Object parseMatlabEngineVariable(MatlabEngine engine, String variableName) throws MatlabException
      Throws:
      MatlabException
    • formatForMatlabEngine

      public static Object formatForMatlabEngine(Object value)
    • parseMatlabEngineVariable

      public static Object parseMatlabEngineVariable(Object value)