Friday, July 24, 2009

Some Detail abt Matlab Functions

abs

Absolute value and complex magnitude

Syntax

  • Y = abs(X)

Description

abs(X) returns an array Y such that each element of Y is the absolute value of the corresponding element of X.

If X is complex, abs(X) returns the complex modulus (magnitude), which is the same as

  • sqrt(real(X).^2 + imag(X).^2)

Examples

  • abs(-5)

    ans =
    5

    abs(3+4i)

    ans =
    5


acos

Inverse cosine

Syntax

  • Y = acos(X)

Description

Y = acos(X) returns the inverse cosine (arccosine) for each element of X. For real elements of X in the domain , acos(X) is real and in the range . For real elements of X outside the domain , acos(X) is complex.

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

Examples

Graph the inverse cosine function over the domain .

  • x = -1:.05:1;
    plot(x,acos(x)), grid on



Definition

The inverse cosine can be defined as



acosh

Inverse hyperbolic cosine

Syntax

  • Y = acosh(X)

Description

Y = acosh(X) returns the inverse hyperbolic cosine for each element of X.

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

Examples

Graph the inverse hyperbolic cosine function over the domain .

  • x = 1:pi/40:pi;
    plot(x,acosh(x)), grid on



Definition

The hyperbolic inverse cosine can be defined as



acot

Inverse cotangent

Syntax

  • Y = acot(X)

Description

Y = acot(X) returns the inverse cotangent (arccotangent) for each element of X.

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

Examples

Graph the inverse cotangent over the domains and .

  • x1 = -2*pi:pi/30:-0.1;
    x2 = 0.1:pi/30:2*pi;
    plot(x1,acot(x1),x2,acot(x2)), grid on



Definition

The inverse cotangent can be defined as

No comments:

Post a Comment