Mercurial > hg > ishara
annotate dsp/phasespec.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | c3b0cd708782 |
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 |