フィルターのクリア

How do I recover data from .5M files?

2 ビュー (過去 30 日間)
Tanweepriya Das
Tanweepriya Das 2021 年 7 月 18 日
コメント済み: Tanweepriya Das 2021 年 7 月 19 日
I have been running the code and it always has saved the workspace as .mat file. However, the workspace has recently been saved as .5M files. What is this .5M format? Can I recover the data from .5M files? or Can I convert from .5M to .mat?

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 7 月 18 日
I don't think I have ever encounted a .5M file format.
Please experiment with the following and tell us what you find:
filename = 'AppropriateFileName.5M';
[fid, msg] = fopen(filename, 'r');
if fid < 0
error('Could not open file "%s" because "%s"', filename, msg);
end
bytes = fread(fid, [1 128], '*uint8');
fclose(fid);
if isempty(bytes)
error('file "%s" was empty\n', filename);
elseif numel(bytes) < 128
fprintf('Note: file "%s" is only %d bytes long\n', numel(bytes));
end
fprintf('File "%s"\n\nFirst bytes as text:\n\n%s\n', char(bytes));
fprintf('First bytes as hex\n')
fprintf('%02x ', bytes); fprintf('\n');
  3 件のコメント
Walter Roberson
Walter Roberson 2021 年 7 月 18 日
What shows up for
ls *.5M
Tanweepriya Das
Tanweepriya Das 2021 年 7 月 19 日
This problem has been sorted. There was some error with the saving of the file. Solved Now. Thank you!

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

カテゴリ

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