Hi there,
I want to extract 8 bits from a 16bit fixed point number using bitsliceget(). Unfortunately the result is always an unsigned variable, which is not what I want.
Here is a little example:
x = fi(-0.12835,true, 16,10);
x.bin
ans = 1111111101111101
y = bitsliceget(x,9,2)
ans = 190
DataTypeMode: Fixed-point: binary point scaling
Signedness: Unsigned
WordLength: 8
FractionLength: 0
y.bin
ans = 10111110
bitsliceget(x,9,2) actually does exactly what I want it to but I just can't get y to become a signed variable without recasting and therefore changing the binary representation.
Any help would be highly appreciated.
Thanks it advance for taking the time!
Regards,
Len