Using Hilbert Transform Code

1 次查看(过去 30 天)
I am attempting to calculate the hilbert transform of
𝑍(𝜏,𝜔)=1/(1+(𝜏𝜔)^2)
with respect to 𝜔 for various values of 𝜏, using a given code:
function h = hilb1(F, N, b, y)
n = [-N:N-1]'; % Compute the collocation points ...
x = b*tan(pi*(n+1/2)/(2*N));
FF = eval(F); % ... and sample the function.
a = fft(fftshift(FF.*(b-1i*x))); % These three lines compute the
a = exp(-1i*n*pi/(2*N)).*fftshift(a); % expansion coefficients.
a = flipud(1i*(sign(n+1/2).*a))/(2*N);
z = (b+1i*y)./(b-1i*y); % The evaluation of the transform
h = polyval(a,z)./(z.^N.*(b-1i*y)); % reduces to polynomial evaluation
% in the variable z.
with an output in the ranges of: omega_vec = logspace(-4, 4, 81)
A brief explanation of the code can be found here: http://appliedmaths.sun.ac.za/~weideman/research/hilbert.html
However, being new to this area of maths and to Matlab, I do not know where to start.
I understand that I should plug in the above function into F, and used the run function on Matlab to test out other known inputs and values.
However, given the information above I am unsure of what N, b, and y should be? I have experimented with multiple values but most result in some sort of error.
Apologies for what could be an elementary question; I am very much a beginner to both the content and to the code and would greatly appreciate a breakdown of how to approach this task or what the code is even doing.

回答(0 个)

产品


版本

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by