MATLAB: Hello, i have a raw ECG text file. how can i plot this? any help? response will be appreciated.

.txt file ecgecg plot

here is the attached text file.

Best Answer

Try this:
data = importdata('106_5.txt')
x = data(:, 1);
y = data(:, 2);
plot(x, y, 'b-', 'LineWidth', 2);
title('ECG Signal', 'FontSize', 20);
xlabel('Time', 'FontSize', 20);
ylabel('Voltage', 'FontSize', 20);
grid on;
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 0.96]);