| Contents | Index |
Y = cos(X)
Y = cos(X) returns the cosine for each element of X. The cos function operates element-wise on arrays. All angles are in radians.
The cosine of an angle is:
![]()
For complex values, cosine is:
![]()
Graph the cosine function over the domain
:
x = -pi:0.01:pi; plot(x,cos(x)), grid on


Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |