Get max, min and precision of a fi
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Jan
le 27 Mar 2019
Modifié(e) : Jan
le 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 commentaires
Jan
le 28 Mar 2019
I cannot test this, because I do not have the FI toolbox. But what about realmax?
Plus de réponses (2)
Harry
le 30 Juil 2021
Modifié(e) : Harry
le 30 Juil 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 commentaires
Voir également
Catégories
En savoir plus sur Fixed-Point Designer dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!