Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

udecode (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the filter implementation class.

Syntax

y = udecode(x, n)

y = udecode(x, n, r)

y = udecode(x, n, r, s)

Description

Decodes quantized integer inputs to floating-point outputs.

Examples

Inputs

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.

'saturate' LabVIEW saturates the elements of x that are outside of the range.
'wrap' (default) LabVIEW wraps the elements according to modulo 2^n arithmetic.

Outputs

Name Description
y Returns the decoded floating-point numbers.

Examples

X = -1:0.01:1;
Y = uencode(X, 4, 1, 'signed');
X1 = udecode(Y, 4, 1);
plot(X, X1)

Related Topics

uencode


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit