实验内容
syms t w
y=exp(-2*t)*heaviside(t); %原函数 a=2
subplot(3,1,1);
ezplot(y);title('原函数');grid on;%填加表格
F=fourier(y,t,w);%做傅里叶变化
subplot(3,1,2);
ezplot(abs(F));title('频谱谱');grid on;%填加表格因为F为虚部,所以加绝对值‘abs’
subplot(3,1,3);
ezplot(angle(F));title('相位谱');grid on;%填加表格
syms t w
y=heaviside(t+1)-heaviside(t-1);
subplot(3,1,1);
ezplot(y,-10,10);title('原函数');grid on;%填加表格
F=fourier(y,t,w)%做傅里叶变化
subplot(3,1,2);
ezplot(F,-10,10);title('频谱谱');grid on;%填加表格因为F不为虚部,所以不加绝对值‘abs’
subplot(3,1,3);
ezplot(angle(F),-10,10);title('相位谱');grid on;%填加表格