MEX with fortran object files
14 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have a fortran program that has a bunch of subroutines written. The code has go tos, etc..., so f2m programs have not been successful. I have investigated compiling the fortran code using mex within MATLAB, but have not been successful.
Alas, I have compiled the fortran script (subroutines.f) into (subroutines.o) object file using f77 compiler on a unix machine. Is there a way to use this object file inside MATLAB to call the functions defined in the fortran program, as if they were functions written in MATLAB?
If so, can someone post an example / tutorial on how to do this?
Thanks!
0 件のコメント
回答 (1 件)
Kaustubha Govind
2011 年 6 月 6 日
You need to write a gateway C/FORTRAN MEX-function that calls into your object file. The documentation has a description and examples for such a function.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fortran with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!