view extra/lab2_4.m @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
line wrap: on
line source
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)));