In all iterations after the first one, there is a missing minus sign before the res in the lower peaks calculation, which causes both peak envelopes and the average envelope to be equal to the upper envelope. IMF and residual 2, 3 and 4 are therefore wrong.
In all iterations after the first one, there is a missing minus sign before the res in the lower peaks calculation, which causes both peak envelopes and the average envelope to be equal to the upper envelope. IMF and residual 2, 3 and 4 are therefore wrong.