フィルターのクリア

How can i open/load .dat (binary) file in matlab?

3 ビュー (過去 30 日間)
msahar
msahar 2013 年 11 月 30 日
編集済み: Image Analyst 2013 年 11 月 30 日
The file is uploaded at this link
https://www.dropbox.com/s/48kftolenx74zvn/BLT.DAT
I obtain it from HP 35665A Dynamic Signal Analyser. It contains amplitude and frequency information to plot graphs.
please help me to read/load and convert this into .mat format.

回答 (1 件)

Image Analyst
Image Analyst 2013 年 11 月 30 日
Use fopen(), fread(), and fclose().
  2 件のコメント
msahar
msahar 2013 年 11 月 30 日
when i use fopen('BLT.dat'), it gives me a variable in workspace with a number 6. when i use fread('BLT.dat'), it shows 'Invalid file identifier. Use fopen to generate a valid file identifier'
when i use fclose('BLT.dat'). it shows String argument must be 'all'.
Nothing works. its a binary file i think. when i open it in word pad it shows thousand of symbols hyphens and @@.
Image Analyst
Image Analyst 2013 年 11 月 30 日
編集済み: Image Analyst 2013 年 11 月 30 日
You never read the help on them, did you. If you did, did you notice any examples at the bottom? The example code looks nothing at all like yours. fread() does not take a file name, it takes a file handle that is the output of fopen(). Same for fclose(). I suggest you try to follow the examples.

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

カテゴリ

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