creating fortran S function

5 ビュー (過去 30 日間)
max
max 2013 年 4 月 5 日
I've tried to compile the exemple of the fortran s function located in matlab/simulink/src
I've copied the file sfuntmpl_fortran.F in my matlab directory, and I've written in the work space
>> mex sfuntmpl_fortran.f
but it doesn't work.
The errors are syntax errors like
"Error sfuntmpl_fortran.f: 2 syntax error; found `C' expecting `;' " but I have not modified the example (sfuntmpl_fortran.F).
  1 件のコメント
Friedrich
Friedrich 2013 年 4 月 5 日
double check your extension of the file. is it really lower case f? Also compile with -v and post the full output here.

サインインしてコメントする。

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2013 年 4 月 5 日
You probably have a C compiler selected for MEX? Could you make sure you have a supported FORTRAN compiler (click on the link against your MATLAB version in the last column) installed, run "mex -setup" at the MATLAB prompt, select a FORTRAN compiler, and try again?

カテゴリ

Help Center および File ExchangeFortran with MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by