view extra codes/lab2_4.m @ 6:8428a0ebd45f

Function for loading MELODIA output
author emmanouilb <emmanouil.benetos.1@city.ac.uk>
date Sat, 20 Apr 2013 14:30:27 +0100
parents 1c0f36c348d4
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)));