Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fs = 200;
- n = 1:200;
- nrx = -100:99;
- w = 2*pi;
- ran = 90*randn();
- x = sin(w*n/fs + ran) ;
- Rn = (1/2)*cos(w*nrx/fs);
- nr = -199:199;
- figure
- for k=1:2:10
- R = xcorr(x);
- subplot(5,2,k);
- plot(nr,R);
- axis([-100 100 -100 100]);
- title(['w =',num2str(w),' ran =',num2str(ran)]);
- w = w + (k-1.5)*pi;
- ran = ran + 90*randn();
- end
- w = 2*pi;
- for i=2:2:10
- subplot(5,2,i);
- plot(nrx,Rn);
- title(['w =',num2str(w)]);
- w = w + (i-2.5)*pi;
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement