Get max, min and precision of a fi
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
What is the easiest way to find the maximum or minimum value that a fi can take?
What is the easiest way to find the precision of a fi?
0 Kommentare
Akzeptierte Antwort
Jan
am 27 Mär. 2019
Bearbeitet: Jan
am 28 Mär. 2019
a = fi(pi, true, 16, 12);
xi = intmax(a)
This is code taken from https://www.mathworks.com/help/fixedpoint/ref/intmax.html , which I found as first link by asking an internet search engine for "Matlab fi maximum value".
a = fi(pi, true, 16, 12);
xd = realmax(a)
3 Kommentare
Jan
am 28 Mär. 2019
I cannot test this, because I do not have the FI toolbox. But what about realmax?
Weitere Antworten (2)
Harry
am 30 Jul. 2021
Bearbeitet: Harry
am 30 Jul. 2021
% A fixed-point object with no value, 18-bit word length, and 16-bit fraction length
a = fi([],1,18, 16)
% The easiest way to find the maximum or minimum value that a fi can represent is
range(a)
% The easiest way to find the precision of a fi is
eps(a)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Fixed-Point Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!