How to convert from FORTRAN TO MATLAB

114 ビュー (過去 30 日間)
Oluwaseyi Aliu
Oluwaseyi Aliu 2020 年 10 月 3 日
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
KSSV 2020 年 10 月 3 日
Options:
  1. Convert the FORTRAN code to MATLAB line by line going through the code.
  2. If problem is known, try knowing the inbuilt functions, toolboxes in MATLAB.

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

回答 (3 件)

Ameer Hamza
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.

Ben Barrowes
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
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.
Ben Barrowes
Ben Barrowes 2023 年 8 月 23 日
Understood. Good luck Rob.

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


ARF
ARF 約23時間 前
編集済み: Stephen23 約21時間 前
I used codeconvert.ai and it worked perfectly!
  1 件のコメント
Ben Barrowes
Ben Barrowes 約20時間 前
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.

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

カテゴリ

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