Class MatlabEngineUtil
- java.lang.Object
-
- org.eclipse.epsilon.emc.simulink.util.MatlabEngineUtil
-
public class MatlabEngineUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description MatlabEngineUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
formatForMatlabEngine(Object value)
static String
getEngineJarPathFromEnv()
static String
getEngineJarPathFromRoot(String matlabPath)
static String
getLibraryPathFromEnv()
static String
getLibraryPathFromRoot(String matlabPath)
static String
getMatlabPathFromEnv()
static List<Boolean>
matlabArrayToList(boolean[] value)
static List<Byte>
matlabArrayToList(byte[] value)
static List<Double>
matlabArrayToList(double[] value)
static List<Float>
matlabArrayToList(float[] value)
static List<Integer>
matlabArrayToList(int[] value)
static List<Long>
matlabArrayToList(long[] value)
static List<Short>
matlabArrayToList(short[] value)
static <T> List<T>
matlabArrayToList(Object[] value)
static Object
parseMatlabEngineVariable(Object value)
static Object
parseMatlabEngineVariable(MatlabEngine engine, String variableName)
static String[]
resolvePaths()
Convenience method providing an array of length 3 with the required paths.static void
resolvePaths(String[] currentPaths)
Resolves paths.
-
-
-
Method Detail
-
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(String[])
-
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
-
getLibraryPathFromEnv
public static String getLibraryPathFromEnv()
-
getEngineJarPathFromEnv
public static String getEngineJarPathFromEnv()
-
getMatlabPathFromEnv
public static String getMatlabPathFromEnv()
-
parseMatlabEngineVariable
public static Object parseMatlabEngineVariable(MatlabEngine engine, String variableName) throws MatlabException
- Throws:
MatlabException
-
-