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

11 Ansichten (letzte 30 Tage)
Apurv Singh
Apurv Singh am 2 Jan. 2019
Beantwortet: gpotiria am 4 Jun. 2019
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 Kommentar
Prajith Chilummula
Prajith Chilummula am 8 Jan. 2019
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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

gpotiria
gpotiria am 4 Jun. 2019
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)

Kategorien

Mehr zu Time Series Collections finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by