Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

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

No tags are associated with this thread.

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.

Contact us