Matlab - Fourier Analysis

1 / 10

# Matlab - Fourier Analysis - PowerPoint PPT Presentation

Matlab - Fourier Analysis. 主講人：林麗娟 主講部分： FFT &amp; 例題. Fourier Transform. 連續時間 下的 Fourier Transform 定義：. 離散時間 下的 Fourier Transform 定義﹝ DTFT﹞：. Fourier Transform. 無限 的 Discrete Fourier transform 定義﹝ DTFT﹞：. 有限 的 Discrete Fourier Transform 定義﹝ DFT﹞：. Compare DTFT &amp; DFT.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Matlab - Fourier Analysis' - yoland

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Matlab - Fourier Analysis

Fourier Transform

Fourier Transform

Compare DTFT & DFT

DFT→可以將信號由時間領域轉換到頻率領域

IDFT→可以將信號由頻率領域轉換回時間領域

FFT & IFFT

% Ex-1

% Prupose : Gnerate a 20 Hz sinnsoid samples at 128 Hz

clear;

N = 64;

T = 1/128;

k = 0:N-1;

x = sin(2*pi*20*k*T);

X = fft(x);

magX = abs(X);

hertz = k*(1/(N*T));

→將先前的變數和函數從記憶體中清除

→取樣數目

→週期

→數據資料的長度

→sin(w*t) = sin(2πf*t)

= sin(2πf*kT) = sin(2*pi*20*k*T)

→做FFT

→算出純量的絕對值

figure;

subplot(311) ; plot(0:T:T*(N-1),x) , ylabel('x(kT)') , grid on

subplot(312) ; stem(k(1:N),magX(1:N)) , ylabel('|X(k)|') , grid on

subplot(313);stem(hertz(1:N),magX(1:N)),ylabel('|X(k)|'),grid on

→產生一個新的圖形視窗

Y軸的標籤

% Ex-2

clear;

n = 63; L = 2;

t = -L:2*L/n:L;

y = sin(13*pi*t/L);

z = fft(y);

p1 = angle(z);

p2 = unwrap(angle(y));

figure;

subplot(411);plot(t,y),ylabel('y=fft(t)'),grid on

subplot(412);plot(0:n,abs(z)),ylabel('Abs'),grid on

subplot(413);plot(0:n,p1),ylabel('phase'),grid on

subplot(414);plot(0:n,p2),ylabel('phase'),grid on

→sin(w*t0 ) = sin(2πf*t0 )

= sin(2πf*t/2L) = sin(πf*t/L)

= sin(13*pi*t/L)

→算出複數z的相位角