Open M73ACat opened 1 year ago
The exact cause of the problem is unclear, so only a temporary solution is provided, where the standard deviation of the first and last columns of the initial single component is compared to determine whether it is flipped or not.
It can be noted that when using the matlab program to decompose the simulated signal with noise (5 dB)%5Csin%20(60%5Cpi%20t)%5C%5C%7Bx_2%7D(t)%20=%202.5%5Ccos%20(10%5Cpi%20t)%5Cend%7Bcases%7D), the initial single components are sorted by energy from largest to smallest, and “fliplr” breaks this distribution so that the program cannot get the correct results. However, it can also be noted that when decomposing the noise-free signal%5Csin(60%5Cpi%20t)%5C%5C%7Bx_2%7D(t)=%5Csin(120%5Cpi%20t)%5C%5C%7Bx_3%7D(t)=0.5%5Ccos(10%5Cpi%20t)%5Cend%7Bcases%7D), the initial single components are sorted by energy from smallest to largest and need to be flipped using “fliplr”. Therefore, a temporary solution is provided by determining the standard deviation of the first and last columns of the initial single component to determine whether it is flipped or not.
if std(sgc(:,end)) > std(sgc(:,1)) y = fliplr(sgc); else y = sgc; end