Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Calling MATLAB from FORTRAN
Date: Mon, 1 Dec 2008 23:03:02 +0000 (UTC)
Organization: Boeing
Lines: 17
Message-ID: <gh1qf5$khr$1@fred.mathworks.com>
References: <0acd22ad-dbf9-4a1f-9cf5-6cccdf3a376e@y18g2000yqn.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1228172582 21051 172.30.248.35 (1 Dec 2008 23:03:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 1 Dec 2008 23:03:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 756104
Xref: news.mathworks.com comp.soft-sys.matlab:504245


Vernal <kveenstra@gmail.com> wrote in message <0acd22ad-dbf9-4a1f-9cf5-6cccdf3a376e@y18g2000yqn.googlegroups.com>...
> I am trying call MATLAB from FORTRAN to plot data. I am using MSVS
> 2008 with Intel FORTRAN 10.1.024. My question is what files, modules,
> or libraries need to be included in the FORTRAN project to recognize
> the MATLAB engine functions (e.g. engOpen, engEvalString, etc...) Any
> help would be appreciated.
> 
>  - Kevin

Be sure to have this line at the top of your code (curiously missing from the doc descriptions of the Fortran API functions):

#include "fintrf.h"

Then just follow the instructions for compiling an engine app using the mex command. You don't need to manually include anything for the eng functions, the mex command will link it in for you.

James Tursa