What is stored integer value of a fi object?

2 ビュー (過去 30 日間)
Rishi Khanna
Rishi Khanna 2016 年 9 月 8 日
回答済み: Andy Bartlett 2018 年 2 月 12 日
I am not able to understand the purpose of the 'fi object' creation and other associated concepts, such as, stored integer of a fi object, its binary/dec representation etc.
Take, for instance, this example code:
>> a = fi(pi, 1, 8, 3)
a =
3.1250
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 3
>> in_x = storedInteger(a)
in_x =
25
>> bin(a)
ans =
00011001
>> dec(a)
ans =
025
Please explain what is happening over here.

回答 (1 件)

Andy Bartlett
Andy Bartlett 2018 年 2 月 12 日
Please see https://www.mathworks.com/help/fixedpoint/ug/scaling_f6389.html

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by