Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.1.0 - English

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Elementary Functions > Trigonometry > cosd

cosd

element-wise cosine function, argument in degree

Syntax

y = cosd(x)

Arguments

x

a real vector/matrix.

Description

For a vector or a matrix x of angles given in degree, cosd(x) is the cosine of its elements. The results are in [-1 1]. For input elements which are equal to n*90 with n integer and odd, the result is exactly zero.

Sample

Examples

cosd([0 30 45 60 90 360])
1 ./ cosd([-90 90])
--> cosd([0 30 45 60 90 360])
 ans  =
   1.   0.8660254   0.7071068   0.5   0.   1.

--> 1 ./ cosd([-90 90])
 ans  =
   Inf   Inf

See also

  • acosd — element wise cosine inverse, result in degree.
  • cos — cosine function
  • acos — element wise cosine inverse (radians)
  • cosh — hyperbolic cosine
  • acosh — hyperbolic cosine inverse
Report an issue
<< cos Trigonometry cosh >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Feb 25 08:49:19 CET 2020