diff extra codes/lab2_4.m @ 3:1c0f36c348d4

extra code for matlab
author Katerina <katkost@gmail.com>
date Sat, 20 Apr 2013 13:03:01 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extra codes/lab2_4.m	Sat Apr 20 13:03:01 2013 +0100
@@ -0,0 +1,9 @@
+N=1024;
+t = [0:1/44100:0.1-1/44100];
+x1=cos(2*pi*100*44100/1024*t);
+x801 = x1(1:801);
+xlength=length(x801);
+fftbuffer=zeros(N, 1);
+fftbuffer(1:(xlength+1)/2) = x801((xlength+1)/2:xlength);
+fftbuffer(N-(xlength-1)/2+1:N) = x801(1: (xlength-1)/2);
+plot(unwrap(angle(fftbuffer,1024)));
\ No newline at end of file