How to open a file of unknown type?
16 ビュー (過去 30 日間)
古いコメントを表示
I am trying to open a file "pulse" of type "file", on my MATLAB, with the purpose of plotting a 2D graph. The type of the file is unknown to me, but when I write:
type pulse
I get a set of random characters as a result. How can I find the type of file, and plot it, as I know this to be a file with data for a 2D plot.
0 件のコメント
回答 (1 件)
Star Strider
2021 年 10 月 9 日
The ‘random characters’ likely mean that it is a binary file. If so, use fread to read it, although unless more is known about the file format, reading it may be a process of trial-and-error until it is imported correctly.
It could also be Unicode, and that would also require some experimentation, possibly with the unicode2native function.
.
2 件のコメント
Star Strider
2021 年 10 月 9 日
See How to decrypt a pcode to understand that it will likely not be possible to convert it back to something readable. If the documentation for it is available, run it using that information.
Good luck with it!
.
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!