www.pudn.com > tfarma10.rar > OCT.m, change:2004-12-17,size:747b


clear;oct

N= 1024;
%offset= 2000;
offset= 3000;
x= readdata('matlab/data/OCT/32768_01.scn', 0, 1);

x= x(offset+1:4:offset+4*N);
x= x/sqrt(energy(x));
%x= x-mean(x);

plot(x)

plot(fftshift(log(abs(fft(x)).^2)))
%plot(fftshift(abs(fft(x).^2)))
NFFT= 256;

k0= N/4;

alf= .01;

H= [];
for k= -N/2:N/2-1
  H= [H; exp(j*2*pi/N*(k-k0)^2*alf/2)];
end;
clot(H)

h= fftshift(ifft(fftshift(H)));
clot(h)

X= fftshift(fft(x));

Y= H.*X;

Y= H.*Y;

clot(Y)

y= ifft(fftshift(Y));

figure(1);clot(x)

figure(2);clot(y)

y= real(y);

figure(1);clf;specgram(x, NFFT, [], symmpad(hamming(128), NFFT), NFFT-1)
figure(2);clf;specgram(y, NFFT, [], symmpad(hamming(128), NFFT), NFFT-1)

Wx = wd(x);
Wy = wd(y);

figure(1);clf;tf_show(Wx)
figure(2);clf;tf_show(Wy)