sin - Sine of argument in radians

Syntax

Y = sin(X)

Description

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

Y = sin(X) returns the circular sine of the elements of X.

Examples

Graph the sine function over the domain .

x = -pi:0.01:pi;
plot(x,sin(x)), grid on

The expression sin(pi) is not exactly zero, but rather a value the size of the floating-point accuracy eps, because pi is only a floating-point approximation to the exact value of .

Definition

The sine can be defined as

Algorithm

sin uses FDLIBM, which was developed at SunSoft, a Sun Microsystems, Inc. business, by Kwok C. Ng, and others. For information about FDLIBM, see http://www.netlib.org.

See Also

sind, sinh, asin, asind, asinh

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS