⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hilbert_demo.m

📁 迫零均衡算法的MATLAB实现,不可多得的好东西.
💻 M
字号:
% hilbert_demo.m -- Demonstration of Hilbert transform and an application%                   to single sideband (SSB) amplitude modulation.%% ELEC 470, Rich Kozick, Spring 1998Ts = 0.05;    % Sample spacingFs = 1/Ts;    % Sampling frequencyt= -5:Ts:5;   % Sample timesg = sinc(t);  % Time signalN = 2^13;     % Number of samples in FFTG = fftshift(fft(g, N));f = (-(N/2):(N/2-1))/N*Fs;figure(1)subplot(211)plot(t,g)title('g(t) = sinc(t)');subplot(212)plot(f,abs(G))title('Amplitude of FFT of g(t)')gplus = hilbert(g);    % Hilbert transform is in imaginary part of gplusghat = imag(gplus);Gplus = fftshift(fft(gplus, N));Ghat = fftshift(fft(ghat, N));figure(2)subplot(211)plot(t,ghat)title('Hilbert transform of g(t) = sinc(t)');subplot(212)plot(f,abs(Ghat))title('Amplitude of FFT')% Plot the pre-envelopefigure(3)plot(f,abs(Gplus))title('Amplitude of FFT of gplus(t)')% Modulate by cos with frequency 5 Hzxdsb = g .* cos(2*pi*5*t);Xdsb = fftshift(fft(xdsb,N));xssb = g .* cos(2*pi*5*t) - ghat .* sin(2*pi*5*t);Xssb = fftshift(fft(xssb,N));figure(4)subplot(211)plot(t, xdsb)title('Double sideband (DSB) time signal')subplot(212)plot(f, abs(Xdsb))title('Amplitude of FFT of DSB signal')figure(5)subplot(211)plot(t, xssb)title('Single sideband (SSB) time signal')subplot(212)plot(f, abs(Xssb))title('Amplitude of FFT of SSB signal')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -