sir i just tried to denoise the ecg signal from database but i was able to get this output with errors, dont know to eliminate can u help me please

1 view (last 30 days)
the result i have obtained.the database i had considered is european st t database which is obtained from physionet atm.
the code i have tried is this
clc;
close all;
clear all;
x=[91,92,90,85,87,91,98,100,97,100,99,100,100,103,106,112,114,112,107,107,107,105,102,100,100,98,97,93,92,90,89,88,87,88,89,95,99,100,100,96,90,86,86,89,99,126,176,258,354,438,483,464,397,307,217,150,116,104,105,105,103,98,95,93,90,91,91,93,96,95,98,95,91,92,93,95,95,92,97,97,97,97,99,99,99,99,99,98,97,100,103,106,103,108,111,114,116,119,115,117,120,124,130,133,139,142,145,146,146,150,152,153,151,152,154,155,154,152,151,147,142,137,132,124,120,114,111,108,106,104,101,100,100,99,97,99,97,97,98,93,97,97,98,96,95,95,98,95,92,91,93,95,97,96,96,97,98,98,96,93,90,89,90,90,95,93,91,90,90,95,93,96,97,95,98,96,90,93,95,97,97,93,97,95,95,93,93,95,95,95,95,91,90,88,87,86,90,91,93,93,90,89,89,90,91,90,92,91,91,93,93,95,97,98,97,95,95,91,93,93,95,93,91,88,91,95,102,106,107,108,105,100,100,105,112,114,112,108,107,108,108,106,105,103,99,97,93,91,92,90,91,91,93,95,95,90,88,90,91,96,99,99,100,111,134,193,272,370,452,482,450,367,274,187,137,117,112,111,109,105,99,97,96,97,99,97,93,95,96,99,100,102,102,105,103,100,97,91,95,95,97,99,100,104,107,108,106,105,105,105,106,108,108,112,113,116,116,121,122,124,129,132,136,138,141,143,147,152,154,154,155,158,158,157,154,150,147,142,139,136,131,125,121,122,120,116,111,112,111,107,105,101,99,99,92,98,100,103,102,99,99,98,102,102,101,102,103,100,98,97,98,97,96,95,91,90,91,95,98,99,99,99,99,95,91,91,95,95,96,99,99,99,103,103,103,100,95,97,99,101,101,97,100,99,98,93,93,96,96,95,95,91,96,99,98,97,97,97,96,98,98,99,99,99,99,95,95,99,97,102,99,99,97,98,97,97,99,100,103,99,95,93,95,91,96,98,99,99,99,100,100,100,100,98,100,101,103,103,102,105,105,108,109,113,116,116,119,120,120,116,116,117,116,112,108,105,103,102,103,99,99,99,97,98,97,92,98,97,95,93,91,97,99,100,99,101,121,167,246,335,422,476,481,428,343,250,172,131,114,111,109,111,112,108,106,104,100,98,99,99,99,99,100,101,103,101,99,97,99,100,102,102,103,108,111,113,112,107,105,105,107,112,115,115,112,111,114,116,114,114,116,124,129,134,137,138,142,145,147,150,151,156,158,162,163,166,166,164,159,153,145,142,138,139,137,129,124,121,119,113,114,111,111,108,108,112,109,107,105,102,103,105,107,106,106,101,100,100,102,103,104,103,100,99,99,100,101,104,103,102,102,103,103,103,103,105,102,105,105,103,100,95,99,100,101,102,102,103,104,103,103,104,105,104,105,103,103,103,102,103,103,106,109,111,108,107,105,102,97,95,93,91,96,98,99,99,99,99,97,98,99,100,100,97,100,99,99,99,100,100,100,99,99,98,100,103,107,111,107,102,99,95,93,97,99,102,103,100,97,95,93,98,97,96,92,93,96,100,105,105,103,99,99,100,103,102,105,104,105,105,104,112,118,119,120,122,123,125,123,115,107,106,106,107,103,102,103,103,101,99,97,98,97,99,100,105,107,106,100,97,95,99,103,99,89,85,90,107,162,240,340,435,490,481,419,329,235,163,125,114,114,112,108,107,107,107,105,105,103,96,87,86,91,93,92,93,95,97,99,92,97,95,97,100,107,107,103,100,99,102,102,102,103,100,100,106,108,112,114,118,120,123,126,130,131,133,136,139,143,147,149,150,151,155,161,165,167,166,162,155,146,139,136,133,130,128,124,119,116,113,111,108,107,103,104,103,100,102,99,99,97,92,97,99,99,99,98,103,103,104,98,93,90,90,89,90,93,93,92,95,95,93,93,93,95,93,93,93,95,96,98,96,93,91,93,95,95,93,90,91,95,97,99,97,102,103,99,90,86,83,83,84,83,81,83,83,86,87,89,89,91,91,90,88,87,87,88,90,97,103,103,96,82,73,74,80,82,83,86,85,90,90,88,88,88,85,88,87,88,88,86,90,90,90,88,87,90,89,91,96,95,91,91,91,90,89,88,86,87,86,88,90,91,93,99,99,97,91,86,84,89,92,98,103,104,106,108,107,114,111,111,108,105,107,105,103,100,96,97,95,95,91,87,87,90,91,89,88,88,90,97,97,95,90,90,91,102,133,197,288,384,463,490,453,369,281,196,136,116,107,107,105,101,98,90,92,95,93,95,95,96,93,93,93,95,95,95,95,95,96,95,97,100,101,102,102,102,98,96,96,97,99,102,104,108,108,111,114,116,115,119,122,124,129,131,132,139,136,141,143,145,152,150,153,152,155,154,155,154,149,145,141,134,132,126,121,116,112,111,108,105,102,103,101,99,97,99,97,99,99,99,98,97,97,95,96,97,96,93,97,96,96,95,90,92,91,91,91,91,90,86,87,91,95,98,98,99,98,97,95,92,93,91,93,95,95,95,95,99,98,97,99,99,98,95,93,91,87,88,86,88,89,89,90,90,85,90,89,90,90,87,90,90,91,90,90,90,90,91,90,90,89,90,91,90,89,89,88,89,89,91,90,91,93,95,93,92,90,90,89,90,90,89,90,90,90,91,87,92,91,91,93,90,95,90,87,86,85,88,90,92,91,91,92,95,93,93,93,95,95,97,96,96,99,102,105,106,104,103,105,108,114,116,116,114,109,107,106,106,100,100,100,99,97,91,95,91,90,89,89,90,89,91,91,91,93,99,99,98,97,103,132,193,278,369,439,465,434,362,272,191,136,115,112,114,113,109,107,101,99,93,95,92,91,95,93,91,97,97,96,96,95,99,98,99,99,99,100,100,101,101,102,103,104,105,107,108,111,114,112,116,117,120,121,123,129,131,133,133,135,137,140,146,149,153,156,161,162,169,166,165,163,163,164,158,153,148,142,134,129,124,124,121,120,114,112,107,102,100,100,103,101,102,103,100,99,100,99,100,99,99,99,100,100,100,99,99,98,100,99,97,98,99,98,98,95,99,99,99,97,98,99,99,99,98,97,99,98,100,99,100,100,99,99,99,100,100,102,103,103,102,102,99,99,99,97,97,95,92,95,97,96,97,97,97,96,97,91,97,96,98,97,93,97,98,97,99,99,98,98,99,99,98,99,99,99,99,99,97,93,90,90,93,95,97,99,98,98,98,98,99,98,99,99,99,97,98,100,99,95,99,99,99,100,99,105,109,113,115,117,115,113,112,114,116,115,116,114,114,112,112,111,109,108,105,103,103,100,99,97,97,95,98,99,100,100,100,100,101,101,103,100,103,122,170,249,347,436,496,499,445,358,265,184,137,119,115,114,114,108,106,105,102,100,100,102,103,101,103,102,103,103,103,105,104,103,105,105,105,107,111,111,111,112,111,111,112,113,111,116,117,118,122,125,124,125,128,131,133,136,141,143,146,149,153,156,158,162,162,166,167,166,166,166,167,164,162,155,151,147,145,139,137,131,128,124,120,117,114,113,108,112,112,112,114,106,109,111,111,109,108,112,109,108,111,108,108,107,107,107,107,106,108,111,109,108,107,107,106,107,105,105,100,104,105,107,107,107,111,108,108,106,108,107,107,108,107,104,107,108,108,107,103,106,108,108,107,107,107,106,107,107,105,106,108,107,107,106,104,103,105,103,103,103,103,103,104,103,103,103,104,102,103,104,105,104,103,105,104,102,106,105,108,106,104,107,105,106,105,104,105,105,105,105,104,104,105,107,106,106,107,107,107,108,109,112,108,108,106,105,104,103,105,105,106,104,106,107,107,107,106,103,107,108,109,112,112,116,119,117,116,119,120,124,129,129,126,124,125,122,119,118,119,116,114,108,107,105,103,103,103,106,105,105,104,104,107,106,109,112,112,113,122,146,202,282,373,452,492,470,402,316,228,165,132,122,121,120,117,112,108,108,106,104,105,105,106,106,107,105,107,107,106,108,107,107,108,108,112,108,108,107,107,111,111,109,112,114,115,117,120,116,119,118,122,129,126,130,131,134,139,141,147,149,152,154,156,161,162,163,163,165,165,166,164,159,156,153,150,142,136,133,131,131,128,122,120,117,114,112,112,108,107,108,109,111,108,103,105,105,105,105,104,106,103,103,103,102,107,106,107,104,103,101,103,103,102,102,100,99,100,102,103,102,103,105,105,105,103,102,103,101,102,100,101,102,104,104,104,100,102,102,103,104,99,101,100,99,99,97,99,99,99,97,99,98,98,99,99,97,97,97,95,93,96,97,99,99,99,100,99,100,98,95,95,95,95,97,96,97,98,93,98,98,100,97,93,93,95,95,96,96,97,99,99,100,99,99,98,99,99,99,99,98,98,98,99,100,97,97,95,97,97,93,99,99,99,99,99,99,98,101,101,105,111,112,113,111,107,109,115,117,119,121,116,116,114,112,109,107,105,103,101,99,99,97,98,99,97,97,96,96,98,97,98,97,98,98,97,97,105,136,197,285,380,450,473,431,345,250,175,130,116,113,113,108,108,103,100,98,99,98,97,97,97,97,99,98,98,99,99,99,99,98,99,100,102,102,103,103,105,106,107,106,106,106,107,108,109,112,114,116,122,117,120,123,126,133,133,136,136,140,143,146,151,153,155,154,155,155,158,157,155,153,150,147,142,137,134,131,125,122,117,116,114,114,114,112,107,107,104,103,103,100,100,100,99,102,100,97,101,100,102,99,97,99,97,97,99,97,99,99,98,98,99,99,100,99,100,102,100,100,100,100,98,97,97,97,99,100,100,100,99,99,98,97,97,97,97,99,98,95,99,99,100,97,91,93,95,96,96,96,95,96,96,95,92,90,91,93,96,96,95,95,95,96,96,95,93,95,96,96,98,97,99,96,98,95,95,95,93,97,95,93,96,95,95,95,90,95,93,91,91,92,96,97,97,97,96,96,98,97,97,99,97,95,96,95,97,99,99,101,105,111,109,111,111,107,112,114,116,113,112,109,109,108,107,105,105,103,99,100,99,97,96,92,97,96,97,95,92,90,92,99,100,102,100,99,108,142,209,298,391,461,479,434,350,253,168,121,108,108,112,111,106,102,99,97,99,98,99,96,91,98,99,99,99,97,101,101,102,100,100,102,103,105,105,104,107,108,107,105,105,105,107,108,112,117,118,119,118,121,122,125,131,136,139,141,147,148,150,151,153,158,163,162,166,166,165,165,161,155,150,146,143,135,131,124,122,117,113,109,111,107,105,102,103,105,103,102,102,102,103,101,100,99,99,99,99,100,99,99,100,99,99,98,98,97,97,98,98,96,99,98,98,97,93,96,99,99,99,98,99,97,97,97,98,98,99,97,96,97,97,97,98,97,98,97,97,97,95,95,93,95,95,96,97,95,97,96,96,96,95,89,91,91,93,92,90,93,93,93,95,93,95,97,96,95,92,95,93,95,91,95,95,95,95,95,95,93,95,93,93,95,95,91,92,92,95,95,98,97,97,95,92,95,95,95,95,93,95,102,105,107,105,102,106,108,112,114,112,112,112,112,112,112,108,107,105,101,102,100,99,97,96,95,93,95,96,93,93,90,91,91,95,99,99,102,123,175];
b = fir1(31,0.5);
mu = 0.008;
d = filter(b,1,x);
ha = adaptfilt.lms(32,mu);
y = filter(ha,x,d) [y,e] = filter(ha,x,d) figure plot(x) subplot(3,1,1); title('inputsignal');
plot(d) subplot(3,1,2); title('outputsignal'); plot(0:2499,[y;e]) subplot(3,1,3); title('errorsignal');
  2 Comments
kavin
kavin on 26 Oct 2013
i have pasted sir, the matrix value are returned as NaN. sir in example with random noise is added with input signal. the .mat file that had been taken from physionet atm will contain noise? so i have to denoise the signal. is my work correct? can you please help me ?

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!