Is there a command to find Representable MIN and MAX for any fixdt ?

조회 수: 12 (최근 30일)
Apurv Singh
Apurv Singh 2019년 1월 2일
답변: gpotiria 2019년 6월 4일
Can we find Representable minimum and maximum for any fixdt dat type created in command prompt
Example
fixdt(1,16,5)
Representable minimum = 1023.9675
Representable maximum = -1024
  댓글 수: 1
Prajith Chilummula
Prajith Chilummula 2019년 1월 8일
The below link might help in finding the minimum and maximum for fixdt datatype:
https://www.mathworks.com/help/fixedpoint/ug/range-and-precision.html

댓글을 달려면 로그인하십시오.

답변 (1개)

gpotiria
gpotiria 2019년 6월 4일
Though is been a long time, an easy solution is:
[min_v,max_v]=range(fi(0,fixdt(1,16,5)))
And to see the proper maximum in the command you will need:
num2str(double(max_v),11)

카테고리

Help CenterFile Exchange에서 Time Series Collections에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by