The clear all;%% DSB modulation% DSB (bilateral band) simply multiplies the modulated signal m (t) and the carrier signal cos (WT) to dt=1/800; T = $; The total time of the% sample. Spectral resolution (DF=1/T). t = 0:DT:T-DT;FM = 2; % modulated signal frequency, Unit KHZFC = 20; The frequency of the% carrier signal, Unit khzm = cos (2*pi*fm*t); % modulated signal s = m.*cos (2*pi*fc*t); %DSB modulated signal [F,SF] = T2F (t,s), figure (1) plot (t,s), Axis ([0,1,-1,1]), figure (2) plot (F,abs (SF)), Axis ([ -30,30,0,55]);
The function t2f is the Fourier transform of the signal.
The percent function computes the Fourier transform of the signal function[f, SF] = t2f (t,st)% T at the last domain sampling point, and St is the sampled time domain signal dt = t (2)-T (1);% T = t (end); t = t (end)-T (1) +DT;DF = 1/t; N = Length (st); f =-n/2*df:df:n/2*df-df;sf = FFT (st); SF = t/n * Fftshift (SF); end
and f2t Fourier inverse transformation.
The Fourier inverse transform function [T, st] = f2t (f, SF) df = f (2)-F (1) of the signal spectrum SF is calculated in percent. FMX = f (end)-F (1) +df;dt = 1/FMX; N = Length (SF); T = dt * N;t = 0:DT:T-DT; % or T =-t/2: DT:T/2-DT;SFF = Fftshift (SF); st = Fmx * IFFT (SFF); end
DSB (bilateral band) modulation