sind

Sine of an angle in degrees.

Category: Mathematics > Elementary Math

Syntax

Y = sind(X)

Returns the sine of each element of X, with X in degrees.

Description

sind(x) avoids the conversion error of sin(x*pi/180): it returns exactly 0 at multiples of 180 degrees and exactly 1 or -1 at 90 and 270. Compare sind(180), which is 0, with sin(pi), which is 1.2246e-16.

The other trigonometric functions have degree versions too: cosd, tand, secd.

Input arguments

X
Angles in degrees.

Output arguments

Y
Array of the same size as X, with values between -1 and 1.

Example

Exact at special angles

sind([0 30 90 180 270])
sin(180*pi/180)
Output
ans = 1×5

         0    0.5000    1.0000         0   -1.0000
ans = 1.2246e-16

See also

sin cosd tand sinpi asind