annotate dsp/phasespec.m @ 32:c3b0cd708782

Imported core dsp tools.
author samer
date Sun, 20 Jan 2013 13:48:47 +0000
parents
children
rev   line source
samer@32 1 function S=phasespec(X)
samer@32 2 % PHASESPEC(X): get phase spectra of columns of x
samer@32 3 %
samer@32 4 % phasespec :: [[N,T]->real] -> [[M,T]->complex]] :- M is N/2+1.
samer@32 5
samer@32 6 m=size(X,1)/2;
samer@32 7 S=fft(X);
samer@32 8 S=S(1:m+1,:)./abs(S(1:m+1,:)); % get complex phases of components.
samer@32 9 % first and last rows should be ones
samer@32 10