wkeep - one dimensional signal extraction
This function extracts vector from the center of the input vector at specified length no matter it is row vector or column vector. For odd length input and even length output or vs versa, the output is selected to close to the end of the input vector. Matrix extraction is not allowed. For details, please refer to the SWT userguide.
-->a=[1 2 3 4 5]'; -->b=wkeep(a,3) ans = 2 3 4 -->b=wkeep(a,2) ans = 3 4 -->a=[1 2 3 4; 5 6 7 8]; -->b=wkeep(a,2) Please use wkeep2 instead! -->a=1; -->b=wkeep(a,3) Please input a longer vector! -->a=[1 2 3 4]; -->b=wkeep(a,4) ans = 1 2 3 4 -->a=[1 2 3 4]; -->b=wkeep(a,5) please input a longer vector!