Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
Matlab Programs

Matlab Programs

Ratings: (0)|Views: 238|Likes:
Published by scribd24121984
DSP MATLAB programs
DSP MATLAB programs

More info:

Published by: scribd24121984 on Nov 17, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

01/23/2013

pdf

text

original

 
SATURDAY, FEBRUARY 20, 2010
**************************************%covolution of two sequences &%comparison with conv command **************************************
x=[1 4 2 4 1 1];h=[1 2 3 4 5];len1=length(x);len2=length(h);len=len1+len2-1;a=fliplr(h);for i=1:lenc(i)=0;for j=1:len1if j>icontinue;endif(len2-i+j)<=0continue;endc(i)=c(i)+(x(j)*a(len2-i+j));endendk=1:len;conv_op1=c(1:len)subplot(2,1,1),stem(k,conv_op1);title('Without using "conv" command')conv_op2=conv(x,h)subplot(2,1,2),stem(k,conv_op2)
**************************************% correlation using Convolution**************************************
 
N = 96;n = 1 : N;x = cos(0.25 *pi *n);rx = conv(x,fliplr(x));k = -28 : 28;subplot(5,1,1);stem(k,rx(68 : 124));xlabel(' log index');ylabel(' Amplitude');title(' clean signal ACF');w=rand(1,N)-0.5;y=x+w;ry=conv(y,fliplr(y));subplot(5,1,2);stem (k,ry(68 : 124));xlabel(' log index');ylabel(' Amplitude');title (' noisy signal ACF');rw=conv(w,fliplr(w));subplot(5,1,3);stem(k,rw(68 : 124));xlabel(' log index');ylabel(' Amplitude');title(' noise ACF');rxw=conv(x,fliplr(w));subplot (5,1,4);stem (k,rxw(68 : 124));xlabel(' log index');ylabel(' Amplitude');title (' clean signal and noise CCF');rxy=conv(x,fliplr(y));subplot (5,1,5);stem (k,rxy(68 : 124));xlabel(' log index');ylabel(' Amplitude');title (' clean and noisy signal CCF');
 
**************************************% correlation and Correlation coefficient**************************************
N = 96;n = 1 : N;x = cos(0.25 *pi *n);rx = xcorr(x);corrcoef(x)k = -28 : 28;subplot(5,1,1);stem(k,rx(68 : 124));xlabel(' log index');ylabel(' Amplitude');title(' clean signal ACF');w=rand(1,N)-0.5;y=x+w;ry=xcorr(y);corrcoef(y)subplot(5,1,2);stem (k,ry(68 : 124));xlabel(' log index');ylabel(' Amplitude');title (' noisy signal ACF');rw=xcorr(w);corrcoef(w)subplot(5,1,3);stem(k,rw(68 : 124));xlabel(' log index');ylabel(' Amplitude');title(' noise ACF');rxw=xcorr(x,w);corrcoef(x,w)subplot (5,1,4);stem (k,rxw(68 : 124));xlabel(' log index');

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
Shailesh Pandey liked this
adddata liked this
creativesumit143 liked this
Imran Syed liked this
prathamgunj liked this
PURUSHOTHAMAN liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->