Home > database >  The novice consult matlab
The novice consult matlab

Time:10-04

Uc=A0 * cos (w0 * t); C1=% carrier signal FFT (Uc); % of the carrier signal Fourier transform CXF=abs (C1); % of the Fourier transform figure (1); Subplot (2,1,1); The plot (t, Uc); The title (' carrier signal waveform); The axis ([0, 0.1 1 1)); Subplot (2,1,2); The plot (f (1: N/2), CXF (1: N/2)); The title (' carrier signal spectrum); Mes=1 + A1 * cos (w1 * t); C2=% modulation signal FFT (mes); % of the modulation signal Fourier transform ZXC=abs (C2); Figure (2) the subplot (2,1,1); The plot (t, mes); The title (' modulation signal '); The axis ([0 0 2] 0.5); Subplot (2,1,2); The plot (f (1: N/2), ZXC (1: N/2)); The title (' modulation signal spectrum); Uam=modulate (mes, fc, Fs, 'am'); C3=% AM modulated signal FFT (Uam); % to the AM modulated signal Fourier transform asd=abs (C3); Figure (3) the subplot (2,1,1); The plot (t, Uam); grid on; The title (' AM modulated signal waveform); Subplot (2,1,2); The plot (f (1: N/2), asd (1: N/2)), the grid; The title (' AM modulated signal spectrum); Dam=demod (Uam, fc, Fs, 'am'); % of the AM modulation signal demodulation C4=FFT (Dam); % the AM demodulation signal Fourier transform wqe=abs (C4); Figure (4) the subplot (2,1,1); The plot (t, Dam); grid on; The title (' AM demodulation signal waveform); The axis ([0 0 2] 0.5); Subplot (2,1,2); The plot (f (1: N/2), wqe (1: N/2)), the grid; The title (' AM demodulation signal spectrum);
  • Related