Inf 函数

来源:互联网 发布:天天酷跑刷坐骑软件 编辑:程序博客网 时间:2024/04/29 23:12

Inf 函数

Infinity

无穷大

Syntax

语法

Inf

Inf('double')

Inf('single')

Inf(n)

Inf(m,n)

Inf(m,n,p,...)

Inf(...,classname)

Description

描述

Inf returns the IEEE arithmetic representation for positive infinity. Infinity results from operations like division by zero and overflow, which lead to results too large to represent as conventional floating-point values.

Inf 返回IEEE运算,表示正无穷大。无穷大结果来自运筹学像零和其他数值的除法运算,其造成了结果过大而无法使用惯用的浮点值表示。

Inf('double') is the same as Inf with no inputs.

Inf('double')是和inf不带任何输入值的情况相同。

Inf('single') is the single precision representation of Inf.

Inf('single')inf的单精度表示。

Inf(n) is an n-by-n matrix of Infs.

Inf(n)是一个infn-by-nn*n)矩阵。

Inf(m,n) or inf([m,n]) is an m-by-n matrix of Infs.

Inf(m,n)inf([m,n])是一个infm-by-nm*n)矩阵。

Inf(m,n,p,...) or Inf([m,n,p,...]) is an m-by-n-by-p-by-... array of Infs.

Inf(m,n,p,)inf([m,n,p])是一个infm-by-n-by-p-by-…阵列。

Inf(...,classname) is an array of Infs of class specified by classname. classname must be either 'single' or 'double'.

Inf(,classname)是一个通过classname的特定的classinfs阵列。classname必须被确认是'single''double'

Examples

例如:

1/0, 1.e1000, 2^2000, and exp(1000) all produce Inf. 

log(0) produces -Inf. 

Inf-Inf and Inf/Inf both produce NaN (Not-a-Number).