How to read a file unrecongnized to Matlab
7 次查看(过去 30 天)
显示 更早的评论
hi, i am working on implementing the ECG on my DSP kit. i have stored the file using the provided software but its extension is ".ecg". Matlab of course does not read it directly...
If a open it in Matlab directory as OPEN AS TEXT, it opens. Then the data is shown to me as values from 8 channels of ECG. It has 8 numericals values in a spaced single row. And there are around 8000 rows with occasionally english text for heart rate and leads off status.
So is there a way i can read it?? Thanks.
0 个评论
回答(2 个)
Fangjun Jiang
2011-6-10
You can use textscan() function to read it. Some other functions are textread(),dlmread(). Try it yourself first.
Walter Roberson
2011-6-11
If you have a mix of numbers and text and the text can appear at any line in the file, then you have to parse the data line by line. See for example the procedure in this Question
8 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Large Files and Big Data 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!