<< tukeywin | FOSSEE_Signal_Processing_Toolbox | uencode >>

FOSSEE_Signal_Processing_Toolbox >> FOSSEE_Signal_Processing_Toolbox > udecode

# udecode

Decodes the input uniformly quantized values

### Syntax

    y=uencode(u,n,v,'saturatemode')

### Parameters

u :

  A vector, matrix or n-dimensional array of integers

n :

  An integer between 2 and 32

v :

  A positive real scalar

saturatemode :

  A string which can take only 2 values 'saturate' or 'wrap'

### Description

Uniformly decodes the input vector or n-dimensional array of integers u with peak values +/- v If u has only positive values, the range of integers is assumed to be [0,2^n-1] If u has positive and negative values the range of integers is assumed to be [-2^(n-1),2^(n-1)-1] If v is not specified, its default value is 1 If saturatemode='wrap' the output is wrapped using modulo arithmetic if overflow occurs If saturatemode='saturate' the output is saturated if overflow accors

### Examples

    u = int8([-1 1 2 -5])
    ysat = udecode(u,3)

### Authors

- Ankur Mallick
- Biblography
- [1] International Telecommunication Union. General Aspects of Digital Transmission Systems: Vocabulary of Digital Transmission and Multiplexing, and Pulse Code Modulation (PCM) Terms. ITU-T Recommendation G.701. March, 1993.

### See also

- uencode — Performs uniform quantization of the input into 2^n levels
- floor

Report an issue
<< tukeywin | FOSSEE_Signal_Processing_Toolbox | uencode >>