Help requested from a user

Paul Thomas paulthomas2@wanadoo.fr
Mon Dec 4 23:23:00 GMT 2006


yunlei@uwm.edu wrote:

I am not entirely sure what you mean:
> To whom it may help:
>
> I am wondering if the Gfortran can be interfaced with MATLAB? In other words,
> how can I invoke Gfortran compiler in MATLAB to compile f90 fortran codes in
> MATLAB?
>   
If you mean, can I use gfortran to make mex files:

Yes, I think so; at very least for Linux and probably for Windows too.  
The mex function allows you to link object files into a mex file, as 
long as you specify that they are fortran - look in the online help for 
'mex'.  I do not know of any reason why this should not work for 
gfortran.  I'll give it a try myself tomorrow.

If you just want to invoke the compiler:

Yes, no problem - use the 'system' function.

Cheers

Paul



More information about the Fortran mailing list