newbie-mat
newbie-mat

Reputation: 11

Hilbert transform of sinus func

i am trying to perform hilbert transform of sinus function using this equation in Matlab, but i get confused about k mean. I read it about phase shifting and i try to put 2*pi, but it still does not work in matlab.

enter image description here

theta=2*pi;
fun=@(t) sin(omega*t-theta)/(t-theta);
h=1/pi.*(integral(fun,-Inf,Inf);
figure (2)
plot(t,real(h),t,imag(h))

I hope someone can explain to me. Thanks in advance I know matlab has a hilbert to calculate this problem, but since i ask to do from the scratch so i trying to understand and write some code of it.

I hope from the result i get some real and imaginer number, so i can plot it

Upvotes: 1

Views: 55

Answers (0)

Related Questions