Executing unix commands in R2012a
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi... I have for several versions executed a fortran program from matlab using !program.exe < input > output unix('program.exe < input > output') system('program.exe < input > output') without any problem. Updating to R2012a now returns 'STOP program.exe terminated with an error' for all of these. I have several versions of matlab installed and the error only occurs on my newest R2012a. The unix command executes correctly if I manually execute the command in the current folder. Also the $PATH is correct when displayed in matlab with unix('echo $PATH') and the program path is correctly found from '!which program.exe'. It must somehow be related to the nature of the fortran program since I can make other programs execute correctly. Are there any assumptions on the nature of the executed command in matlab? Any hint to what the error might be would be greatly appreciated.
0 comentarios
Respuesta aceptada
Walter Roberson
el 17 de En. de 2013
See http://www.mathworks.co.uk/matlabcentral/answers/43640-a-peculiar-problem-when-using-system-command-to-run-a-c-shell-script-from-matlab and follow through to Ben's work-around.
Más respuestas (1)
Jan
el 17 de En. de 2013
"Stopped with an error" sounds like it would be rather useful to see the corresponding error message. Perhaps a file is missing, the current folder is write protected or the memory is exhausted. Without seeing a message, there could be 1000th of reasons and it is impossible for you and for us to guess any details.
2 comentarios
Jan
el 17 de En. de 2013
Can you modify the program? The some output could reveal, where the program fails.
Ver también
Categorías
Más información sobre Startup and Shutdown en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!