cos
fi
对象的余弦值(以弧度为单位)
说明
示例
定点角度的余弦值
计算定点输入值的余弦值。
X = fi([0,pi/4,pi/3,pi/2,(2*pi)/3,(3*pi)/4,pi])
X = 0 0.7854 1.0472 1.5708 2.0944 2.3562 3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 13
Y = cos(X)
Y = 1.0000 0.7072 0.4999 0.0001 -0.4999 -0.7070 -1.0000 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 15
输入参数
X
— 以弧度表示的输入角度
标量 | 向量 | 矩阵 | 多维数组
以弧度为单位的输入角度,指定为标量、向量、矩阵或多维数组。
X
可以是有符号或无符号的实数值:
fi
单精度fi
双精度fi
定点(具有二进制小数点定标)fi
定标双精度(具有二进制小数点定标)
示例: X = fi([pi pi/6],1,8);
数据类型: fi
输出参量
Y
— 输入角度的余弦值
标量 | 向量 | 矩阵 | 多维数组
输入角的余弦值,以实数值 fi
标量、向量、矩阵或多维数组形式返回。
详细信息
余弦
角度 Θ 的余弦定义为
算法
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
版本历史记录
在 R2012a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)