How to run MATLAB in background

自作多情 提交于 2020-05-16 22:00:16

问题


I have 2 programs:

  1. A Fortran program that does a lot of calculations using intel compiler and Visual studio 2013, Windows 10. It generates a dataintomatlab.dat file as an input for the MATLAB program and receives a dataoutmatlab.dat file from MATLAB.
  2. A MATLAB m.file which loads dataintomatlab.dat and save data as dataoutmatlab.dat as an input for the Fortran program.

The following code is used to link the Fortran program with MATLAB:

result_matlab = SYSTEMQQ("C:\PROGRA~1\MATLAB\R2019a\bin\matlab.exe" -wait -nodesktop -nosplash -r "my_mfile")

However, this is not efficient for large computations, because the MATLAB program has to be initiated and closed at each timestep, which takes a lot of time.

Is there any way to run MATLAB in the background without initiation and shut down every time and only make MATLAB do its work when it detects the dataintomatlab.dat is updated? Or is there a better solution to link the Fortran program with MATLAB?

来源:https://stackoverflow.com/questions/61500980/how-to-run-matlab-in-background

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!