Fortran code to MatLab converter (f2matlab)

Hey!
I'm trying to convert a Fortran code to MatLab that I found at the appendix of this article (https://quark.phy.bnl.gov/~creutz/mypubs/pub092.pdf). My question is similar to https://www.mathworks.com/matlabcentral/answers/46264-how-do-i-install-f2matlab, I use the function over the fortran code and it doesn't create a file.m at the same directory. I already read the README file and it says " The output will be filename.m in the same directory." but I still don't get my desirable output. I would like to know if someone uses this tool and can help me before I contact the code's author. I also accept suggestions of alternatives to converse get these code on MatLab.
Regards,
Miguel Cardoso

6 Comments

What specific error comes up? What command did you try to use to convert your code?
I'm only using f2matlab('filename.f90') and I'm getting
Index exceeds the number of array elements (0).
Error in wordconverter_f (line 1009)
funstr{i}=[funstr{i}(1:parens(1)),subscripts{1},funstr{i}(parens(2):end)];
Error in f2matlab (line 3909)
[funstr,fortranfunwords,tempflag,temp2,temp4,needThings]=wordconverter_f(i,j,funstr,funstrnumbers,funstrnumbers_b,funstrnumbers_e,funstrwords,funstrwords_b,funstrwords_e,fs_good,funwords,fortranfunwords,formats,localVar,modLocalVar,MLapp,varp,want_row,var_words,this_fun_name,TFops,allTypeDefs,funwordsML,statementFunction,fun_name,dumvar,want_gl,fundecline,funargs,needThings,usedMods);
Looks like there is some fortran function that should have some imput arguments, but for some reason does not.
Please mail me the fortran code and I can take a look: barrowes@alum.mit.edu
Hi I'm having the exact same problem. I wonder if this problem can be fixed?
Please email me and I can take a look.
Hello, I also have the same problem. I wonder if you can help me to solve it. Thank you.

Sign in to comment.

Answers (0)

Categories

Asked:

on 15 Apr 2019

Commented:

on 28 Sep 2022

Community Treasure Hunt

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

Start Hunting!