Following relationship between magnitude response and phase response for minimum phase:
I have implemented in C++ code using the Hilbert Transform C code from file found online ht.c. However, I am not getting the phase response as expected. My magnitude response follows raised cosine formula:
Essentially I provide $|H(j\omega)| = \text{Gain}(f)$ to be all real values as per this cosine formula. The phase response is not as expected. Also, how am I suppose to handle $\log(|H(i\omega)|)$ when $|H(i\omega)| = 0$? Am I missing any steps to obtain phase response in this process?
Here is how phase and magnitude response should look like: