23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

cot, coth<br />

2cot, coth<br />

Purpose Cotangent and hyperbolic cotangent<br />

Syntax Y = cot(X)<br />

Y = coth(X)<br />

Description The cot and coth functions operate element-wise on arrays. The functions’<br />

domains and ranges include complex values. All angles are in radians.<br />

2-342<br />

Y = cot(X) returns the cotangent for each element of X.<br />

Y = coth(X) returns the hyperbolic cotangent for each element of X.<br />

Examples Graph the cotangent and hyperbolic cotangent over the domains – π < x < 0 and<br />

0 < x < π.<br />

x1 = -pi+0.01:0.01:-0.01; x2 = 0.01:0.01:pi-0.01;<br />

plot(x1,cot(x1),x2,cot(x2))<br />

plot(x1,coth(x1),x2,coth(x2))<br />

y=cot(x)<br />

100<br />

80<br />

60<br />

40<br />

20<br />

0<br />

-20<br />

-40<br />

-60<br />

-80<br />

-100<br />

-4 -3 -2 -1 0<br />

x1,x2<br />

1 2 3 4<br />

y=coth(x)<br />

150<br />

100<br />

50<br />

0<br />

-50<br />

-100<br />

-4 -3 -2 -1 0<br />

x1,x2<br />

1 2 3 4

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!