fopen - change the file the foler is opening

2 ビュー (過去 30 日間)
eden meirovich
eden meirovich 2021 年 4 月 21 日
コメント済み: Jonas 2021 年 4 月 21 日
Hello!
i had a code with was opening some files in the folder the m files was in, i did it like this:
bat_ip = fopen( bat_name, 'wt' );
i don't know how, but it stop working. the file is still opening, beacue fopen is returning a number difrent that -1, but the file that was open is not in the folder the m files is in, where i wish it to be.
any one know what could change and how can i returen it to open from the place the m file is located?
thank you!
  1 件のコメント
Jonas
Jonas 2021 年 4 月 21 日
maybe you have issues because you ran your code multiple times and tried to open the filename mutiple times. dont forget to use fclose(fileID) or if you dont know the id you can use fclose('all')

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by