Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

cos - Cosine of argument in radians

Syntax

Y = cos(X)

Description

Y = cos(X) returns the cosine for each element of X. The cos function operates element-wise on arrays. All angles are in radians.

Definitions

The cosine of an angle is:

For complex values, cosine is:

Examples

Graph the cosine function over the domain :

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

References

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

See Also

acos | acosd | cosd | cosh

  


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