# Hilbert transform of symbolic function in Matlab

I have a signal of the form $$f(\omega,x) = g(\omega) e^{i \omega (x +c)},$$ for $$g: [\omega_1 , \omega_2] \rightarrow C, \, x\in R$$ and some constant $$c.$$ I want to get the function $$F (\omega,x) = \mathcal{H} ( \Re \{f(\cdot,x)\}) (\omega),$$ where $$\mathcal{H}$$ denotes the Hilbert transform with respect to frequency $$\omega,$$ and $$\Re$$ the real part. I need the function $$F$$ to be again symbolic on $$x$$ such that I can differentiate it later.

I am trying to implement it in Matlab using:

L = 1e-2; K = 100; c = 1;
omega = (1/L)*(-K:K-1);

g = exp(-omega.^2/4);

syms x; f(x) = real(g.*exp(1i*omega*(x+c)));


but then the hilbert build-in function is not working. Do you have any idea how to do it?

## 1 Answer

The real part, the Hilbert transform and the derivation are all operators that commute. So you can move the derivative just close to the function.

• "commune"? or "commute"? – robert bristow-johnson May 21 at 23:14
• I don't even have the excuse that letters are close on the keyboard – Laurent Duval May 23 at 7:15
• Thanks for your comment, but I think this does answer my question. The derivative is with respect to x and the Hilbert with respect to omega. My question is if the hilbert transform can be applied to f, that is symbolic at x, and result to a symbolic function at x. – Nikolas May 23 at 8:58