PDA

View Full Version : calling shell in fortran


yo6781
Jun12-09, 04:09 AM
Hello!

I'm new here and I was wondering if anyone could help me.

I've a program in fortran which I want to combine with Matlab, both working in Ubunt 7.10 but I don't want to use mex-functions or matlab engine functions because it could cause damage to the fortran program I'm using. I was wondering if it would be possible to do it with a calling to the shell. Does anybody know if it is possible and how could I do it??

Thank you

eys_physics
Jul13-09, 08:37 AM
If you are using the gfortran compiler there is a subroutine called "system" http://gcc.gnu.org/onlinedocs/gfortran/SYSTEM.html. But be aware about that this makes your code compiler dependent, so if it is possible you should avoid to use it.