2017-05-11 14 views
2

나는 한쪽 편면 푸리에 변환으로부터 열 벡터 인 실제 웨이블릿 w를 얻으려고합니다. 이론에 따르면, 음의 주파수면은 양수면의 복소 공액이지만 Matlab (ifft() 함수 사용)에서 구현하면 두통이 생깁니다. 아래, 감쇠 된 사인 웨이블렛 w를 주파수 영역으로 W로 변환하는 작은 프로그램을 나열하고 있습니다. 그리고 나서 positive 부분을 추출하고 conj (flipud (W))를 사용하여이를 보강합니다. 그러나 역 FFT는 웨이블릿 진폭을 다른 것으로 변조합니다. 그러나 w = ifft (W, 'symmetric')는 잘 작동합니다. 문제를 확인하기위한 제안 사항은 매우 높이 평가됩니다. 이전하지 않았던 이유는 아직 파악되지 않은단면 스펙트럼 + 허미 시안으로부터 시간 함수를 복원

clc; clear all 
% Genetate a damped sine wavelet 
n = 100; 
n2 = floor(n/2)+ 1; 
dt = .25; 
for i = 1:n 
    t = (i-1)*dt; 
    w(i,1) = 100 * sin(t) * exp(-0.2*t); 
end 

figure; subplot(3,2,1); plot(w); 
title('The Signal') 
%------------------------------------- 
W1 = fft(w);     % 2-sided 
n2 = floor(n/2)+ 1; 
W2 = fft(w,n2);    % 1-sided 
subplot(3,2,3);plot(real(W2)); 
title('2-sided abs(W2)') 
subplot(3,2,5);plot(imag(W2)); 
title('2-sided angle(W2)') 
%------------------------------------- 

w1 = ifft(W1) ;     % Works fine 
subplot(3,2,2); plot(w1); 
title(' w2 = ifft(W2); (2-sided) '); 

% -------------------------------------- 
% Use the /symmetric/ option of ifft() with 
% the single-sided spectrum 

w2 = ifft(W2 , 'symmetric'); % 1-sided, works fine 

subplot(3,2,4);plot(w2,'k'); 
title('w2 = ifft(W2, "symmetric")') 

% -------------------------------------- 
% Calculate the complex-cojugate of 1-sided W2 
% (excluding the zero frequency point?!), flip it, 
% and attach it to the tail of W2 col vector. 

H = flipud(conj(W2(2:n2))); 
W3 = [W2 ; H]; 
w3 = ifft(W3) ; % sourse of my migraine headache 
% If you let n =1000 instead of the 100, the effect of 
% amplitude-modulation-like effect is less and the output 
% (bottom right graph)resembles the input wavelet but 
% with a thicker line. 
% If n=100 and W2(1:n2-1) in H = ... is used instead 
% of the W2(2:n2), you'll get a flying bold eagle! 


subplot(3,2,6);plot(w3,'k'); 
title('w3 = ifft([W2 ; H]') 
%---end of the program------------------- 

답변

0

다음 작품 :하지만

clc; clear all 

% Genetate a damped sine wavelet 
n = 101; n2 = floor(n/2) + 1; dt = 0.25; 

t = [(0:1:n-1)*dt]'; w = sin(t).*exp(-0.2*t); 

figure; subplot(2,1,1);plot(w); 
title('The Wavelet') 

W1 = fft(w);    % 2-sided 
W2 = W1(1:n2);    % 1-sided 

H = flipud (conj(W1(2:n2))); 
W3 = [W2 ; H]; 
w3 = ifft(W3);    % 2-sided 

subplot(2,1,2); plot(w3); 
title('w3 = ifft([ W3; H ]') 

%---------- end of the program---------- 
0

문제는이 라인이다 : 여기

는 목록입니다

W2 = fft(w,n2);    % 1-sided 

이것은 첫 번째 n2 출력을 반환한다는 암시 된 가정과는 달리 length(w) 크기의 FFT (예상되는 단면 스펙트럼을 제공하는 경우) 인 경우이 줄은 w의 전체 FFT (양면 스펙트럼)를 n2 개 샘플로 대신 반환합니다.

수정 업데이트 된 코드와 마찬가지로, 결과의 첫 번째 n2 샘플을 선택 후 W의 전체 FFT를 계산하고 그 다음입니다 :

W1 = fft(w); 
W2 = W1(1:n2);