Thread Subject: Calling MATLAB from FORTRAN

Subject: Calling MATLAB from FORTRAN

From: Vernal

Date: 1 Dec, 2008 22:34:29

Message: 1 of 3

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

Subject: Calling MATLAB from FORTRAN

From: Jiro Doke

Date: 1 Dec, 2008 22:56:02

Message: 2 of 3

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

I would check out this page:

http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f38569.html

jiro

Subject: Calling MATLAB from FORTRAN

From: James Tursa

Date: 1 Dec, 2008 23:03:02

Message: 3 of 3

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

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
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com