Friday, July 24, 2009

Description Continued...

atan

Inverse tangent

Syntax

  • Y = atan(X)

Description

Y = atan(X) returns the inverse tangent (arctangent) for each element of X. For real elements of X, atan(X) is in the range .

The atan function operates element-wise on arrays. The function's domains and ranges include complex values. All angles are in radians.

Examples

Graph the inverse tangent function over the domain .

  • x = -20:0.01:20;
    plot(x,atan(x)), grid on



Definition

The inverse tangent can be defined as

Algorithm

atan uses FDLIBM, which was developed at SunSoft, a Sun Microsystems, Inc. business, by Kwok C. Ng, and others. For information about FDLIBM.



atan2

Four-quadrant inverse tangent

Syntax

  • P = atan2(Y,X)

Description

P = atan2(Y,X) returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tangent (arctangent) of the real parts of Y and X. Any imaginary parts are ignored.

Elements of P lie in the closed interval [-pi,pi], where pi is the MATLAB floating-point representation of . atan uses sign(Y) and sign(X) to determine the specific quadrant.



atan2(Y,X) contrasts with atan(Y/X), whose results are limited to the interval , or the right side of this diagram.

Examples

Any complex number is converted to polar coordinates with

  • r = abs(z)
    theta = atan2(imag(z),real(z))

For example,

  • z = 4 + 3i;
    r = abs(z)
    theta = atan2(imag(z),real(z))

    r =
    5

    theta =
    0.6435

This is a common operation, so MATLAB provides a function, angle(z), that computes theta = atan2(imag(z),real(z)).

To convert back to the original complex number

  • z = r *exp(i *theta)
    z =

    4.0000 + 3.0000i

Algorithm

atan2 uses FDLIBM, which was developed at SunSoft, a Sun Microsystems, Inc. business, by Kwok C. Ng, and others. For information about FDLIBM.

atanh

Inverse hyperbolic tangent

Syntax

  • Y = atanh(X)

Description

The atanh function operates element-wise on arrays. The function's domains and ranges include complex values. All angles are in radians.

Y = atanh(X) returns the inverse hyperbolic tangent for each element of X.

Examples

Graph the inverse hyperbolic tangent function over the domain .

  • x = -0.99:0.01:0.99;
    plot(x,atanh(x)), grid on

Definition

The hyperbolic inverse tangent can be defined as

Algorithm

atanh uses FDLIBM, which was developed at SunSoft, a Sun Microsystems, Inc. business, by Kwok C. Ng, and others. For information about FDLIBM.

No comments:

Post a Comment