Windows executable works in cmd but not using Matlab system() oder dos() functions
7 views (last 30 days)
Show older comments
Johannes Gutsmiedl
on 11 Sep 2015
Edited: Johannes Gutsmiedl
on 21 Sep 2015
I am tying to run a program (FCEA2.exe) from Matlab. When I enter the command line in Windows using cmd (running as admin), it works perfectly fine using
R:\FCEA2
However, when I try using
dos('R:\FCEA2')
in Matlab (running Matlab as admin) I get this error:
At line 3455 of file cea2.f (unit = 14, file = 'thermo.lib')
Fortran runtime error: End of file
The same thing happens using system() instead of dos(). I get the same problem when I force Windows to use my own user account via runas in cmd, even though I have admin privileges. I am using Windows 7 and the academic version of Matlab 2015a. Does anyone know a way to solve this problem?
4 Comments
Ed Yu
on 14 Sep 2015
I think the error is pretty clear, where is your 'thermo.lib'? Is it in the PATH env. variable when launching MATLAB?
Walter Roberson
on 14 Sep 2015
Ed, note that if the problem were with opening the file then normally the failure would be at the open rather than getting end of file unexpectedly. It would depend upon the coding, of course.
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!