Thread Subject: making MATLAB see the Fortran compiler

Subject: making MATLAB see the Fortran compiler

From: Kevin Johnson

Date: 26 Nov, 2009 03:44:21

Message: 1 of 3

I continue to struggle to get Matlab R2009b to see gfortran 4.3.0, which I installed using the automatic installer provided with the gfortran package. My OS is 10.6.2.

How do I point MATLAB to the location of the compiler?

Subject: making MATLAB see the Fortran compiler - SOLVED

From: Kevin Johnson

Date: 2 Dec, 2009 22:58:03

Message: 2 of 3

I've found the solution. The PATH needs to have in it the directory where gfortran is stored, in my case "/usr/local/bin/". However, you cannot add this directory by using the graphical user interface in the Matlab top menu (File...Set path...etc). I guess this is because the Mac hides this and other directories within the Matlab application "package".
I worked around this problem by placing a path statement in my startup.m file as follows:

setenv('PATH', [getenv('PATH') ':/usr/local/bin']);

This is the directory where the GNU gfortran 4.3.0 installer automatically puts the compiler.

I'd be curious if anyone else has had this problem and whether they have found this solution helpful.

Thanks

Subject: making MATLAB see the Fortran compiler - SOLVED

From: William

Date: 10 Jan, 2010 00:17:04

Message: 3 of 3

"Kevin Johnson" <defer.jof@gmail.com> wrote in message <hf6rdr$63q$1@fred.mathworks.com>...
> I've found the solution. The PATH needs to have in it the directory where gfortran is stored, in my case "/usr/local/bin/". However, you cannot add this directory by using the graphical user interface in the Matlab top menu (File...Set path...etc). I guess this is because the Mac hides this and other directories within the Matlab application "package".
> I worked around this problem by placing a path statement in my startup.m file as follows:
>
> setenv('PATH', [getenv('PATH') ':/usr/local/bin']);
>
> This is the directory where the GNU gfortran 4.3.0 installer automatically puts the compiler.
>
> I'd be curious if anyone else has had this problem and whether they have found this solution helpful.
>
> Thanks

Worked for me.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com