フィルターのクリア

How can I change a FOTRAN code into a MATLAB code

3 ビュー (過去 30 日間)
Johan Johan
Johan Johan 2019 年 8 月 23 日
コメント済み: Johan Johan 2019 年 8 月 23 日
To convert, followings are some steps i applied :
1. Download and extract f2matlab into your computer
2. In matlab, go to the folder in which you extract f2matlab
3. In matlab command, put >> f2matlab('myfortran.f');
During conversion I have following errors
>> f2matlab('mmm.f'); %the filte mmm.f in desktop
-----------------------------------------------------------
| f2matlab -- Ben Barrowes, Barrowes Consulting |
-----------------------------------------------------------
Error using fscanf
Invalid file identifier. Use fopen to
generate a valid file identifier.
Error in f2matlab (line 212)
fid=fopen(filename);
filestr=fscanf(fid,'%c');
fclose(fid);
I searched internet but did not find answer how to solve my problem. Can anyone tell me how to solve this error Message in MATLAB .

採用された回答

KOU DU
KOU DU 2019 年 8 月 23 日
It shows there's somthing wrong when open the file. Please check
fid=fopen(filename)
is not equal to -1 and ensure that your fortran file is in the same path of your matlab file.
  1 件のコメント
Johan Johan
Johan Johan 2019 年 8 月 23 日
Thank you the problem is fixed.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by