Main Content

La traducción de esta página aún no se ha actualizado a la versión más reciente. Haga clic aquí para ver la última versión en inglés.

Convertir y cuantizar datos

Cuantización de tipos de datos de punto fijo y punto flotante, conversión entre tipos de datos

Cuando diseñe algoritmos de punto fijo, utilice cast, zeros, ones, eye y subsasgn para separar el núcleo del algoritmo de las definiciones de tipos de datos. Estas funciones permiten utilizar tipos de datos de precisión doble, precisión simple y punto fijo en el mismo código. Manual Fixed-Point Conversion Best Practices describe cómo pasar de código genérico de MATLAB® a una implementación de punto fijo eficiente.

Para simular aritmética de precisión completa utilizando dobles y cuantizar solo a la salida del algoritmo, utilice quantizenumeric.

Para simular datos de punto flotante con longitud de palabra y longitud de exponente arbitrarias, utilice el objeto quantizer y las funciones de objeto asociadas.

Funciones

expandir todo

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 (desde R2020a)
cast64BitIntToFiCast 64-bit integer types to an equivalent fi object type (desde R2020a)
castFiToIntCast fi object to equivalent integer data type (desde R2020a)
castFiToMATLABCast fi object type to an equivalent built-in MATLAB data type (desde R2020a)
castIntToFiCast an integer data type to equivalent fi type (desde R2020a)
subsasgnSubscripted assignment
subsrefSubscripted reference
quantizenumericQuantize numeric data
quantizerCreate quantizer object
quantizeCuantizar datos numéricos mediante el objeto quantizer
assignmentquantizerCreate quantizer object with fi object attributes
copyobjMake independent copy of quantizer object
randquantGenerate uniformly distributed, quantized random number using quantizer object
resetReset objects to initial conditions
unitquantizeQuantize numeric data using quantizer object except numbers within eps of +1
unitquantizerCreate unitquantizer object
denormalmaxLargest denormalized quantized number for quantizer object
denormalminSmallest denormalized quantized number for quantizer object
epsPrecisión relativa cuantizada para objetos fi o quantizer
exponentbiasExponent bias for quantizer object
exponentlengthExponent length of quantizer object
exponentmaxMaximum exponent for quantizer object
exponentminMinimum exponent for quantizer object
fractionlengthFraction length of quantizer object
getProperty values of object
lsbScaling of least significant bit of fi object, or value of least significant bit of quantizer object
rangeNumerical range of fi or quantizer object
realmaxLargest positive fixed-point value or quantized number
realminSmallest positive normalized fixed-point value or quantized number
setSet or display property values for quantizer objects
tostringConvertir un objeto fi, fimath, numerictype o quantizer en una cadena
wordlengthWord length of quantizer object
logreportQuantization report
maxlogLog maximums
minlogLog minimums
noperationsNumber of quantization operations by quantizer object
noverflowsNumber of overflows
nunderflowsNumber of underflows
resetlogClear log for fi or quantizer object
bin2numConvertir una cadena binaria de complemento a dos en un número utilizando el objeto quantizer
hex2numConvert hexadecimal string to number using quantizer object
num2binConvert number to binary representation using quantizer object
num2hexConvert number to hexadecimal equivalent using quantizer object
num2intConvert number to signed integer using quantizer object
isequalDetermine whether real-world values of two fi objects are equal, or determine whether properties of two fimath, numerictype, or quantizer objects are equal
isfixedDetermine whether input is fixed-point data type
isfloatDetermine whether input is floating-point data type
isquantizerDetermine whether input is quantizer object
errmeanMean of quantization error
errpdfProbability density function of quantization error
errvarVariance of quantization error
roundRound fi object toward nearest integer or round input data using quantizer object
fixed.QuantizerQuantize fixed-point numbers
quantizeQuantize fi values using fixed.Quantizer object

Temas