How to run MATLAB backstage
2 ビュー (過去 30 日間)
古いコメントを表示
I have 2 programs:
1. A Fortran program which 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 recevies a dataoutmatlab.dat file from MATLAB.
2. 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 backstage 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?
Thanks in advance.
1 件のコメント
Walter Roberson
2020 年 4 月 29 日
Yes, there are possibilities. See https://www.mathworks.com/help/matlab/external-language-interfaces.html?s_tid=CRUX_lftnav
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Fortran with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!