No BSD License  

Highlights from
writing fortran mex file

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 1.94 KB File ID: #23397

writing fortran mex file

by Alain Barraud

 

23 Mar 2009

fortran mex file which call user matlab function with varargin argument.

| Watch this File

File Information
Description

I have found some difficulties to write fortran mexfile and this small example shows how I have considered the problem of exchanging data between matlab and fortran and "vice versa".
My problem was to use some optimzation fortran codes operating upon function written within matlab and with almost the facilities offered by the optimization toolbox functions, in particular the varargin argument for user special function parameters. I also consider the question of fortran write, because the mexprintf does not work "in real time" R2006, R2007 or R2008.
The example is a simple problem. It consists in finding the zero of a nonlinear function by dichotomy. The submission contains a a matlab test, the matlab code fzdm.m (zero finder) and its fortran mexfile implementation fzd.f

MATLAB release MATLAB 7.7 (R2008b)
Other requirements intel fortran compiler
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
fortran mex file Alain Barraud 23 Mar 2009 14:08:33
varargin structure Alain Barraud 23 Mar 2009 14:08:33
fortran write Alain Barraud 23 Mar 2009 14:08:33

Contact us at files@mathworks.com