이 예제에서 a는 워드 길이가 8비트이고 소수부 길이가 7비트인 부호 있는 fi 객체입니다. reinterpretcast 함수는 a를 워드 길이가 8비트이고 소수부 길이가 0비트인 부호 없는 fi 객체 c로 변환합니다. a와 c의 실제 값은 다르지만 이진수 표현은 동일합니다.
a = fi([-1 pi/4],1,8,7)
a =
-1.0000 0.7891
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 7
T = numerictype(0,8,0);
c = reinterpretcast(a,T)
c =
128 101
DataTypeMode: Fixed-point: binary point scaling
Signedness: Unsigned
WordLength: 8
FractionLength: 0