Is there a way to convert FORTRAN source code into MATLAB coding without using MEX?

조회 수: 1 (최근 30일)
I'm a beginner using MatLab 2016 Student wanting to convert FORTRAN source code into MatLab. I've read about MEX converting FORTRAN into binary code, but cannot understand how to convert binary into ASCII (?) format. Can someone please explain this conversion process?

채택된 답변

James Tursa
James Tursa 2016년 7월 7일
In general, you cannot take a compiled binary file and run it through some process to recover the original ASCII source code. You either need to use the binary file as-is, or find the original source code, or write new source code.
  댓글 수: 2
Kenneth Lamury
Kenneth Lamury 2016년 7월 7일
What about using Prof Benjamin E Barrowes' 'f2matlab' function? Such a conversion program exist at http://engineering.dartmouth.edu/~benjamin_e_barrowes/consulting/consultingIndex.html. I'm thinking of using it.
James Tursa
James Tursa 2016년 7월 7일
If you have the Fortran source code, then yes give that a shot and it may get you 90% of the way there (you will still have to hand edit the results to fix things that were not converted correctly). But your Question stated you wanted to convert the mex'ed binary file back to the original ASCII source code ... and that you cannot do.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fortran with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by