Main Content

Conversion manuelle en virgule fixe dans MATLAB

Conversion assistée d’un algorithme virgule flottante en algorithme virgule fixe

Utilisez la fonction buildInstrumentedMex pour instrumenter votre algorithme afin d'enregistrer les valeurs minimale et maximale de toutes les variables nommées et intermédiaires. Utilisez la fonction showInstrumentationResults pour proposer des types de données à virgule fixe en fonction des valeurs enregistrées.

Fonctions

développer tout

buildInstrumentedMexGenerate compiled C code function including logging instrumentation
showInstrumentationResultsResults logged by instrumented, compiled C code function
clearInstrumentationResultsClear results logged by instrumented, compiled C code function
fiConstruct fixed-point numeric object
fimathSet fixed-point math settings
numerictypeConstruct an embedded.numerictype object describing fixed-point or floating-point data type
eyeCreate identity matrix with fixed-point properties
onesCreate array of all ones with fixed-point properties
zerosCreate array of all zeros with fixed-point properties
castCast variable to different data type
cast64BitFiToIntCast fi object types that can be exactly represented to a 64-bit integer data type (depuis R2020a)
cast64BitIntToFiCast 64-bit integer types to an equivalent fi object type (depuis R2020a)
castFiToIntCast fi object to equivalent integer data type (depuis R2020a)
castFiToMATLABCast fi object type to an equivalent built-in MATLAB data type (depuis R2020a)
castIntToFiCast an integer data type to equivalent fi type (depuis R2020a)

Rubriques

Résolution des problèmes

Resolve Error: Function is not Supported for Fixed-Point Conversion

Troubleshoot functions that are not supported for fixed-point conversion.

Resolve Error: fi*non-fi

Troubleshoot fi*non-fi errors.

Resolve Error: Data Type Mismatch

Troubleshoot data type mismatch errors.

Resolve Error: Mismatched fimath

Troubleshoot mismatched fimath errors.