Member of the filter implementation class.
y = udecode(x, n)
y = udecode(x, n, r)
y = udecode(x, n, r, s)
Decodes quantized integer inputs to floating-point outputs.
| Name | Description | ||||
| x | Specifies the integers to decode. If the elements of x are signed integers, all elements of x must fall in the range [-2^(n-1), 2^(n-1)-1]. Otherwise, all elements of x must fall in the range [0, 2^n-1]. | ||||
| n | Specifies the level of quantization. n is a positive integer between 2 and 32. | ||||
| r | Specifies the output range. r is a positive number. The default is 1. | ||||
| s | Specifies how to treat the overflows. s accepts the following values.
|
| Name | Description |
| y | Returns the decoded floating-point numbers. |
X = -1:0.01:1;
Y = uencode(X, 4, 1, 'signed');
X1 = udecode(Y, 4, 1);
plot(X, X1)