- Convert the FORTRAN code to MATLAB line by line going through the code.
- If problem is known, try knowing the inbuilt functions, toolboxes in MATLAB.
How to convert from FORTRAN TO MATLAB
조회 수: 32 (최근 30일)
이전 댓글 표시
Dear all,
Please am working on a project and now found a FORTRAN code to speed up my research but I having been using MATLAB and so, I need to convert the newly found FORTRAN code to MATLAB. Please kindly help me out on this conversion or give a detail explanation on how best I can convert from FORTRAN to MATLAB. The FORTRAN code is in the attachment. Thanks in anticipation!
댓글 수: 1
KSSV
2020년 10월 3일
Options:
답변 (4개)
Ameer Hamza
2020년 10월 3일
I don't think you can automatically convert your FORTRAN code to MATLAB; however, you can compile it as mex file and use it in MATLAB.
댓글 수: 0
Ben Barrowes
2020년 10월 3일
My f2matlab can do this kind of conversion. Please download from the file exchange and give it a try. You will have to split the code up into the five files in the pdf and run f2matlab on each file.
I might also do a free conversion if I get time, but in any case, if you run into trouble PM me.
댓글 수: 9
roborrr
2023년 8월 23일
HI Ben Barrowes, Thank you so much for responding so kindly to my question. I'm just starting to study this topic and some questions arose that I could not solve on my own from the instructions you suggested. With your permission, I will later send questions in a personal mail that I have not resolved, after I try to solve it myself.
ARF
2025년 2월 15일
편집: Stephen23
2025년 2월 15일
I used codeconvert.ai and it worked perfectly!
댓글 수: 1
Ben Barrowes
2025년 2월 15일
The ai converters can do many things well, but not others. Memory manipulation is difficult for them (common's, equivalence, etc.) for example. Other fortran constructs are also difficult. But for simple codes, ai conversion works.
阔
2025년 5월 12일
Recently I was working on the conversion of .f90 files to matlab code, but the amount of fortran code is very large. Is there any quick way to achieve an accurate conversion?
댓글 수: 1
Ben Barrowes
2025년 5월 12일
You can try to give each routine separately to an AI converter. Then reassemble all the outputs.
I could also take a look if you PM me: barrowes@alum.mit.edu
참고 항목
카테고리
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!