扫频

来源:互联网 发布:淘宝优惠券转化 编辑:程序博客网 时间:2024/04/19 08:42
clc;clear;Ls = 32768;% yang ben shufs = 1024;% cai yang pin lvt0 = 0: 1/fs : (Ls-1)/fs;t1 = t0(length(t0));f0 = 100;% qi shi pin lvf1 = 400;% zhong zhi pin lvx = 1 * chirp(t0, f0, t1, f1) + 0 * chirp(t0, f1 + f0, t1, f1 + f1);% yi bei pin xin haosubplot(3, 1, 1);plot(t0, x);fftPoints = Ls;ff = fft(x, fftPoints);fre = ((1 : 1 : fftPoints) - 1) * fs / fftPoints;amp = abs(ff) / (fftPoints / 2);subplot(3, 1, 2);plot(fre(1:fftPoints/2), amp(1:fftPoints/2));subplot(3, 1, 3);spectrogram(x, 128, 64, 128, fs);

0 0
原创粉丝点击