How to execute a matlab file on the background through Java? -



How to execute a matlab file on the background through Java? -

i have java programme makes changes matlab file reads , executes function. there way invoke , run read.m file through java programme without having open matlab? tried searching matlabcontrol documentation didnt find relevant. appreciate if guide me through.

thank in advance.

public static void tomatlab() throws matlabconnectionexception, matlabinvocationexception { matlabproxyfactoryoptions options = new matlabproxyfactoryoptions.builder() .setusepreviouslycontrolledsession(true) .build(); matlabproxyfactory mill = new matlabproxyfactory(options); matlabproxy proxy = factory.getproxy(); proxy.eval("addpath('c:\\path_to_m_file)"); proxy.feval("read"); proxy.eval("rmpath('c:\\path_to_m_file')"); // close connection proxy.disconnect(); }

you need runtime environment vor m-code. possibilities see are:

use matlab command opens matlab use builder ja deploys jar including necessary parts of runtime if m-code compatible octave, can utilize c++ interface of octave create dll, can used independent matlab .

java matlab invoke

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -