Change directory in MATLAB from terminal / JAVA

I need to be able to change the working directory in MATLAB without interacting with the command window. I am running MATLAB from a Java application. Right now, the only solution I came up with is to close MATLAB, change the directory from JAVA, and restart. Is there an optimized way to send MATLAB the cd command from JAVA? Doing this from the command line will also work, since I could use getRuntime (). Exec (command)

Thank!

0
source share
2 answers

JMI, JVM, Matlab ( , ). ( WAY / ). Google : http://www.cs.virginia.edu/~whitehouse/matlab/JavaMatlab.html. , JAR Matlab, com.mathworks.jmi.Matlab. :

Matlab.evalConsoleOutput("cd('C:\Program Files\')");

http://UndocumentedMatlab.com

+3

, . , , , , . matlabcontrol.googlecode.com

MATLAB Java-, MATLAB.

+2

Source: https://habr.com/ru/post/1728953/


All Articles