rescale
fi 객체의 스케일링 변경
구문
b = rescale(a, fractionlength) b = rescale(a, slope, bias) b = rescale(a, slopeadjustmentfactor, fixedexponent, bias) b = rescale(a, ..., PropertyName, PropertyValue, ...)
설명
rescale 함수는 다음 예외를 제외하면 fi 복사 함수와 비슷하게 작동합니다.
fi복사 생성자는 실제 값을 유지하지만rescale은 저장된 정수 값을 유지합니다.rescale에서는Signed속성과WordLength속성을 변경할 수 없습니다.
예제
다음 예제에서는 fi 객체 a를 다시 스케일링하여 fi 객체 b를 생성합니다. a와 b의 실제 값은 다르지만 저장된 정수 값은 동일합니다.
p = fipref('FimathDisplay','none',... 'NumericTypeDisplay','short'); a = fi(10, 1, 8, 3)
a =
10
numerictype(1,8,3)b = rescale(a,1)
b =
40
numerictype(1,8,1)stored_integer_a = storedInteger(a); stored_integer_b = storedInteger(b); isequal(stored_integer_a,stored_integer_b)
ans = logical 1
확장 기능
버전 내역
R2006a 이전에 개발됨