?? fangbo_ft.m
字號(hào):
%周期方波的傅立葉級數(shù)展開
close all;
clear all;
T=1;
N_sample=128;
dt=T/N_sample;
N=2;
t=0:dt:N*T-dt;
%d=sign(randn(1,N));
d = [+1 -1];
x=ones(N_sample,N);
y=diag(d);
ft = x*y;
ft = reshape(ft,1,N*N_sample);
subplot(211);
plot(t,ft);
axis([0 100 -2 2]);
df=1/(N*T);
f=-df*(N*N_sample/2)+df:df:df*(N*N_sample)/2;
subplot(212)
plot(f,abs( fftshift(fft(ft))) );
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -