single (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: support

Requires: MathScript RT Module

Syntax

c = single(a)

Description

Converts input elements to single-precision numbers.

Details

Examples

Inputs

Name Description
a Specifies a numeric scalar, vector, or matrix.

Outputs

Name Description
c Returns the elements of a as single-precision numbers. c is a matrix. If a is a complex number, this function converts the real and imaginary parts of the number separately and then returns a complex number that consists of those parts. To return a single-precision representation of a when the input is complex, use the real function to extract the real part of a, then use the single function to convert the real part.

Details

This function has the same approximate range as single-precision numbers in LabVIEW. If an element in a is greater than the maximum positive number, the corresponding element in c is Inf. If an element in a is less than the minimum positive number or greater than the minimum negative number, the corresponding element in c is 0. If an element in a is less than the maximum negative number, the corresponding element in c is -Inf.

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Yes

Examples

A = int8(12.3)
C = single(A)

Related Topics

double
int16
int32
int64
int8
uint16
uint32
uint64
uint8

文章是否对您有帮助?

没有帮助