Call .m from Fortran

This program serves as a simple example on how to interface a Fortran program to MATLAB.
5.2K Downloads
Updated 26 Sep 2003

No License

This heavily commented Fortran program serves as a simple example on how a MATLAB .m file can be called from Fortran. Suitable if this is your first time trying this.

The basic mechanism is to pack the C-compiled .m into a .dll and link to it from Fortran. Argument and result xfer mechanism is explained so that program can be easily expanded.

Cite As

Alex Pudmenzky (2026). Call .m from Fortran (https://www.mathworks.com/matlabcentral/fileexchange/4004-call-m-from-fortran), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Fortran with MATLAB in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0