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是近似值

相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页