Unwrap with tolerance other than default (=pi)
I encountered a problem with the Matlab function “unwrap” when I tried to unwrap the phase of a signal with a jump tolerance other than pi.
I used the following phase for testing the behavior of the “unwrap” function:
phs = [0.1, 0.2, 0.3, 0.4, 0.4+pi-0.1, 0.4+pi-0.05, 0.4+pi-0.01];
There is a jump in the phase angle between elements four and five that is smaller than pi.
I then tried to eliminate this jump using the “unwrap” function and the tolerance pi/2:
phs = unwrap(phs, pi/2);
The phs vector didn’t change. It also didn’t change by using any other value for the tolerance.
Shouldn’t it eliminate the jump by adding +/- 2pi or by adding +/- pi/2?I encountered a problem with the Matlab function “unwrap” when I tried to unwrap the phase of a signal with a jump tolerance other than pi.
I used the following phase for testing the behavior of the “unwrap” function:
phs = [0.1, 0.2, 0.3, 0.4, 0.4+pi-0.1, 0.4+pi-0.05, 0.4+pi-0.01];
There is a jump in the phase angle between elements four and five that is smaller than pi.
I then tried to eliminate this jump using the “unwrap” function and the tolerance pi/2:
phs = unwrap(phs, pi/2);
The phs vector didn’t change. It also didn’t change by using any other value for the tolerance.
Shouldn’t it eliminate the jump by adding +/- 2pi or by adding +/- pi/2? I encountered a problem with the Matlab function “unwrap” when I tried to unwrap the phase of a signal with a jump tolerance other than pi.
I used the following phase for testing the behavior of the “unwrap” function:
phs = [0.1, 0.2, 0.3, 0.4, 0.4+pi-0.1, 0.4+pi-0.05, 0.4+pi-0.01];
There is a jump in the phase angle between elements four and five that is smaller than pi.
I then tried to eliminate this jump using the “unwrap” function and the tolerance pi/2:
phs = unwrap(phs, pi/2);
The phs vector didn’t change. It also didn’t change by using any other value for the tolerance.
Shouldn’t it eliminate the jump by adding +/- 2pi or by adding +/- pi/2? unwrap, tolerance, tol, jump, fish MATLAB Answers — New Questions