This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mxGetInf (C and Fortran)

Value of infinity

C Syntax

#include "matrix.h"
double mxGetInf(void);

Fortran Syntax

real*8 mxGetInf

Returns

Value of infinity on your system.

Description

Call mxGetInf to return the value of the MATLAB® internal inf variable. inf is a permanent variable representing IEEE® arithmetic positive infinity. Your system specifies the value of inf; you cannot modify it.

Operations that return infinity include:

  • Division by 0. For example, 5/0 returns infinity.

  • Operations resulting in overflow. For example, exp(10000) returns infinity because the result is too large to be represented on your machine.

Examples

See these examples in matlabroot/extern/examples/mx:

Introduced before R2006a