Hi there,
I was wondering why the sum function increases the length of my fixed point variable.
Here is a little example:
fimath('SumMode','KeepMSB')x = fi(1:100,true,8,0)...y = sum(x)y = 5050 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 15 FractionLength: 0
I actually expected y to be 39, which is the decimal representation of 00100111 (the first 8 bit of y). It seams that the sum function just works with FullPrecision anyways?! Am I doing something wrong here?
Any help is highly appreciated.
Regards,
Len
Best Answer