Get max, min and precision of a fi
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Jan
il 27 Mar 2019
Modificato: Jan
il 28 Mar 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 Commenti
Jan
il 28 Mar 2019
I cannot test this, because I do not have the FI toolbox. But what about realmax?
Più risposte (2)
Harry
il 30 Lug 2021
Modificato: Harry
il 30 Lug 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 Commenti
Vedere anche
Categorie
Scopri di più su Create Fixed-Point Objects in MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!