Fortran

Find here some resources and tricks about fortran

Tricks

argument intent

if you use an allocatable array as an OUT argument but you allocate it outside the subroutine, you need to put an INOUT intent.

insert the code here
PROGRAM tutorial_ex1a
USE nag_lib_support, ONLY :nag_lib_ident
IMPLICIT NONE
CALL nag_lib_ident
END PROGRAM tutorial_ex1a

Using modules

notes on how to use modules

Exchanging data with Matlab

example source file

nice website on matlab and fortran

The compiling, linking can be tricky, you need to add the path to the matlab library to the two following environment variables:

export LIBRARY_PATH="/cvos/shared/apps/matlab/2008a/bin/glnxa64/"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/cvos/shared/apps/matlab/2008a/bin/glnxa64"
gfortran third.f90 -lmx -lmat
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License