MATLAB: How can i plot the ECG from this txt file

ecg

I got txt files of ecg records, but i can not open them. Can somebody help me.

Best Answer

That has to be the strangest format for an EKG file I have ever seen. There appear to be 9 different leads. (It appears to demonstrate ‘electrical alternans’, possibly secondary to pericardial effusion or tamponade. I do not see any T-waves.)
This seems to work, at least for the file you attached:
fidi = fopen('956.txt','rt');
D = textscan(fidi, 'A%sA%sA%sA%sA%sA%sA%sA%sA%s', 'CollectOutput',1);
EKG = str2double(D{:});
figure
plot(EKG(:,1)) % Plot Channel #1
grid
% axis([0 500 ylim])
You need to determine the sampling frequency so that you can create the appropriate time vector for your EKG, and do any signal processing on it that you want.
Experiment to get the result you want.