admin 管理员组

文章数量: 887021

matlab里面sin函数是角度,matlab中的sin(函数)



笔记:matlab中的sin(函数)

sin

Sine of an argument in radians

Syntax

Y = sin(X)

Description

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

Y = sin(X) returns the circular sine of the elements of X.

Examples

Graph the sine function over the domain

.

x = -pi:0.01:pi;

plot(x,sin(x)), grid on

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

话说,这里的sin( -pi:0.01:pi)中的0.01是取样频率,-pi,pi是范围

也就是得到样本:{-pi+0.01,-pi+0.02,-pi+0.03,......pi-0.01,pi}

当然,这里的pi是近似值

本文标签: matlab里面sin函数是角度 matlab中的sin(函数)