# find phase greater than 2*pi in MATLAB

I'm working on extracting the phase information in a given signal in MATLAB. I've the following vector;

signal = [exp(1i*10) exp(1i*100) exp(1i*1000) exp(1i*10000)];


When I use angle function in MATLAB to calculate the phase value, it returns the following result.

angle(signal) = -2.5664   -0.5310    0.9735   -2.8310


I want to calculate the original phase values, as follows,

  [10 100 1000 10000];

1. How to find the original phase values above interval [-π,π] in MATLAB?
• Your map is many-to-one, it cannot be inverted. Sep 29, 2020 at 12:34
• What do you mean? I want to find actual phase information, without scaling by 2*pi. Sep 29, 2020 at 12:36
• Measuring the angle of a wheel does not tell you how many full rotations is has done to get there. I'm not sure what you're not understanding. Sep 29, 2020 at 12:39
• I'm not interested in measuring the angle. I only want to find out the phase value. For ex: Phase value may contain frequency offset value. In that case, I'm not interested in just angle, but the entire phase value, so that I could extract the frequency offset value. Sep 29, 2020 at 12:41

You can, if you increase phase between samples slowly enough, using unwrap(angle(signal)). "Slowly enough" means the phase doesn't jump by more than $$2 \pi$$; unwrap works by tracking "total phase". Python equivalent implementation here (note you can configure discont there for jumps greater than $$\pi$$ (or TOL) but it's pointless with angle since it outputs within $$[-\pi, \pi]$$).
Otherwise, can't, as described by others. For an infinite number of inputs, you get the same output, like asking "what's $$N$$ in $$N\ \%\ 2 = 0$$" (division by 2 remainder).
$$y = e^{ix}, x \in \mathbb{R}$$ is a many to one relationship , that means it's not uniquely invertible. Angles are periodic in $$2\pi$$ so there is no reason to. $$10000$$ and $$10000+2*pi$$ are the SAME anle.