www.delorie.com/gnu/docs/octave/octave_139.html   search  
 
Buy GNU books!


GNU Octave

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16.3 Trigonometry

Octave provides the following trigonometric functions. Angles are specified in radians. To convert from degrees to radians multipy by pi/180 (e.g. sin (30 * pi/180) returns the sine of 30 degrees).

Mapping Function: sin (z)
Mapping Function: cos (z)
Mapping Function: tan (z)
Mapping Function: sec (z)
Mapping Function: csc (z)
Mapping Function: cot (z)
The ordinary trigonometric functions.

Mapping Function: asin (z)
Mapping Function: acos (z)
Mapping Function: atan (z)
Mapping Function: asec (z)
Mapping Function: acsc (z)
Mapping Function: acot (z)
The ordinary inverse trigonometric functions.

Mapping Function: sinh (z)
Mapping Function: cosh (z)
Mapping Function: tanh (z)
Mapping Function: sech (z)
Mapping Function: csch (z)
Mapping Function: coth (z)
Hyperbolic trigonometric functions.

Mapping Function: asinh (z)
Mapping Function: acosh (z)
Mapping Function: atanh (z)
Mapping Function: asech (z)
Mapping Function: acsch (z)
Mapping Function: acoth (z)
Inverse hyperbolic trigonometric functions.

Each of these functions expect a single argument. For matrix arguments, they work on an element by element basis. For example,

 
sin ([1, 2; 3, 4])
     =>  0.84147   0.90930
         0.14112  -0.75680

Mapping Function: atan2 (y, x)
Return the arctangent of y/x. The signs of the arguments are used to determine the quadrant of the result, which is in the range pi to -pi.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright © 2003   by The Free Software Foundation     Updated Jun 2003