exa031102_hilbert.m

来自「关于含噪信号的快速傅里叶变换和希尔伯特变换」· M 代码 · 共 23 行

M
23
字号
%----------------------------------------------------------------------------
% exa031102_hilbert.m, for example 3.11.2
% to test hilbert.m,and to find the Hilbert transform of signal x(n)
%----------------------------------------------------------------------------
clear all;

N=25;
f=1/16;
x=sin(2*pi*f*[0:N-1]);
y=hilbert(x);
% 求 x 的希尔伯特变换;

subplot(221)
stem(x,'.');
hold on;
plot(zeros(size(x)));
subplot(222)
stem(imag(y),'.');        
% imag(y) is the Hilbert transform of x(n);
hold on;
plot(zeros(size(x)));

⌨️ 快捷键说明

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