发布网友 发布时间:2022-04-23 22:41
共1个回答
热心网友 时间:2023-06-26 10:50
单载频信号
clc;clear;
D=2*pi*rand;
f0=8e6;
A=1;
T=25.6e-6;
Fs=80e6;Ts=1/Fs;
N=T/Ts;
t=linspace(-T/2,T/2,N);
St1=A*exp(j*(2*pi*f0*t+D));
subplot(2,1,1)
plot(t*1e6,real(St1));
xlabel('Time (us)');
title('Real part of signal');
grid on;axis tight;
subplot(2,1,2)
freq=linspace(-Fs/2,Fs/2,N);
plot(freq*1e-6,fftshift(abs(fft(St1))));
xlabel('Frequency (MHZ)');
title('Magnitude spectrum of signal');
grid on;axis tight;