Open .raw file

4 ビュー (過去 30 日間)
Sara
Sara 2017 年 10 月 5 日
コメント済み: Sara 2017 年 10 月 5 日
Hi all,
I'm trying to open a .raw file with fid = fopen('mc-gpu_dose.dat.raw', 'r'); A = fread(fid, 'float32'); but I get the value -1 (only with this file, for others it works). Is it a damaged file or is it possible I am doing something wrong? Thanks in advance

採用された回答

Jan
Jan 2017 年 10 月 5 日
Do you get "-1" for fid or for A? In the first case, there is no file with this file name. In the second case, the file contains a -1 as float32. I cannot guess, why you assume, that the file is damaged. If you have any reasons to assume, that the file contains something else, explain this with all required details.
A file, which contains a -1 might or might not be "damaged".
  1 件のコメント
Sara
Sara 2017 年 10 月 5 日
Thanks for the answer. I obtained -1 for fid. It was a problem with the file name.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeVariables についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by