Contenuto principale

La traduzione di questa pagina non è aggiornata. Fai clic qui per vedere l'ultima versione in inglese.

Conversione manuale in virgola fissa in MATLAB

Convertire un algoritmo in virgola mobile in un algoritmo in virgola fissa in modo assistito

Utilizzare la funzione buildInstrumentedMex per strumentalizzare l’algoritmo e registrare i valori minimi e massimi di tutte le variabili con nome e intermedie. Utilizzare la funzione showInstrumentationResults per proporre tipi di dati in virgola fissa basati su questi valori registrati.

Funzioni

espandi tutto

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
cast64BitIntToFiCast 64-bit integer types to an equivalent fi object type
castFiToIntCast fi object to equivalent integer data type
castFiToMATLABCast fi object type to an equivalent built-in MATLAB data type
castIntToFiCast an integer data type to equivalent fi type

Argomenti

Risoluzione dei problemi

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.

Esempi in primo piano