The bitshift C = bitshift(A, k) returns the value of A shifted by k bits. Input argument A must be an unsigned integer or an array of unsigned integers.
But I need the signed version.
I used to use floor(x/(2^n)) to emulate x>>n, is it right?
I copy the x >> y definition from a video standard (H.264).
Arithmetic right shift of a two's complement integer representation of x by y binary digits. This function is defined only for positive integer values of y. Bits shifted into the MSBs as a result of the right shift have a value equal to the MSB of x prior to the shift
operation.