주요 콘텐츠

이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.

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를 생성합니다. ab의 실제 값은 다르지만 저장된 정수 값은 동일합니다.

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

확장 기능

모두 확장

C/C++ 코드 생성
MATLAB® Coder™를 사용하여 C 코드나 C++ 코드를 생성할 수 있습니다.

HDL 코드 생성
HDL Coder™를 사용하여 FPGA 및 ASIC 설계를 위한 VHDL, Verilog 및 SystemVerilog 코드를 생성할 수 있습니다.

버전 내역

R2006a 이전에 개발됨

참고 항목