cos 函数

来源:互联网 发布:pc电流测试软件 编辑:程序博客网 时间:2024/06/10 07:46

cos 函数

Cosine of an argument in radians

余弦是弧度中的一个自变量。

Syntax

语法

Y = cos(X)

Description

描述

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

cos函数在阵列上控制元素方法。函数的区域和区间包括复数。所有弧度中的方面。

Y = cos(X) returns the circular cosine for each element of X. 

Y=cos(X)返回X的每个元素的圆余弦。

Examples

例如:

Graph the cosine function over the domain .

余弦函数在区间上的函数图像。

x = -pi:0.01:pi; 

plot(x,cos(x)), grid on

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

表达式cos(pi/2)不是确切的零但是一个浮点精度的大小的值,eps,因为pi仅仅是一个浮点逼近到的强制值。

Definition

定义

The cosine can be defined as

余弦能够被定义为

Algorithm

算法

cos 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.

cos使用FDLIBM,其是在sunsoft发展,一个sun microsystemsinc。公司,通过KwokC.Ng,和其他人。关于FDLIBM的信息,查阅http://www.netlib.org.

原创粉丝点击