The command,
>> reinterpretcast(fi(2^4-1,0,4,0), fixdt(1,4,3))
produces the error
This parameter must be a numerictype object.
The reinterpretcast function requires the second input to be a numeric type.
The command,
>> fixdt(1,4,3)
returns
NumericType with properties: DataTypeMode: 'Fixed-point: binary point scaling' Signedness: 'Signed' WordLength: 4 FractionLength: 3 IsAlias: 0 DataScope: 'Auto' HeaderFile: '' Description: ''
This indicates that it is a numeric type.
The command
>> isnumerictype(fixdt(1,4,3))
returns
ans = logical 0
indicating it isn't a numeric type.
This is inconsistent.
How should I cast a FI number as a different FI type with the same storedInteger representation?
Best Answer