简体   繁体   English

MATLAB中如何读取.dat文件

[英]How to read .dat file in MATLAB

I am trying to read an ECG signal from PTB dataset, the file extension is ".dat",i am using Matlab function for that:我正在尝试从 PTB 数据集中读取 ECG 信号,文件扩展名为“.dat”,我为此使用 Matlab function:

load('s0484_re.dat');

where "s0484_re.dat" is the file name but i am getting an error like this:其中“s0484_re.dat”是文件名,但我收到这样的错误:

Error using load Unknown text on line number 1 of ASCII file s0484_re.dat "�����\�".在 ASCII 文件 s0484_re.dat“������\��”的第 1 行使用加载未知文本时出错。

Error in signal2image (line 8) load('s0484_re.dat'); signal2image(第 8 行)加载错误('s0484_re.dat');

how i can read this file correctly?我怎样才能正确读取这个文件? Any help will be appreciated..任何帮助将不胜感激..

The file extension .dat can be used for many different types of binary data file and doesn't tell you what format the data is in.文件扩展名.dat可用于许多不同类型的二进制数据文件,并且不会告诉您数据的格式。

By searching on 'PTB dataset` I found the information that the data files in this dataset are in 'WaveForm DataBase (WFDB) format', and by searching mathworks.com for 'WFDB' I found a few links including a toolbox for handling WFDB files .通过搜索“PTB 数据集”,我发现该数据集中的数据文件采用“WaveForm DataBase (WFDB) 格式”的信息,并通过在 mathworks.com 中搜索“WFDB”,我找到了一些链接,包括用于处理 WFDB 的工具箱文件 Try this toolbox, and update your question if it doesn't solve your problem.试试这个工具箱,如果它不能解决您的问题,请更新您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM