Programmer Guide/Command Reference/EVAL/atan: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====atan=====
Compute the inverse tangent of the argument. The function is applied element-wise and the result has always the same type as the argument ''x''. The values of the result are in the range '''-pi .. pi'''.
----
;Usage 1: <code>atan(<var>x</var>)</code>
:;<var>x</var>: a scalar, vector or matrix
;Result: The inverse tangent of ''x''.
----
;Usage 2: <code>atan(<var>y</var>, <var>x</var>)</code>
:;<var>x</var>: a scalar, vector or matrix
:;<var>y</var>: must have the same type as ''x''
;Result: The inverse tangent of <code>''y''/''x''</code>. E.g. this function can be used to compute the phase of a complex number: <code>''phi'':=atan(''im'',''re'')</code>
----
;See also: [[../tan|tan]], [[../asin|asin]], [[../acos|acos]], [[../complex arithmetic|complex arithmetic (cr2p, cr2phi)]]


Inverse tangent.
[[../#Functions|<function list>]]
 
=====Usage:=====
 
<code>atan(<var>x</var>)</code>
 
=====Function:=====
 
Compute the inverse tangent of <var>x</var>.
 
=====Result:=====
 
The inverse tangent of <var>x</var>.
 
=====Usage:=====
 
<code>atan(<var>a</var>, <var>b</var>)</code>
 
=====Function:=====
 
Uses the C++ function <code>atan2(a,b)</code> to compute the inverse tangent (<var>a</var> and <var>b</var> must have the same datatype).
 
=====Result:=====
 
The inverse tangent of <var>a</var><code>/</code><var>b</var> with the same type as <var>a</var>.

Latest revision as of 10:14, 21 April 2011

Compute the inverse tangent of the argument. The function is applied element-wise and the result has always the same type as the argument x. The values of the result are in the range -pi .. pi.


Usage 1
atan(x)
x
a scalar, vector or matrix
Result
The inverse tangent of x.

Usage 2
atan(y, x)
x
a scalar, vector or matrix
y
must have the same type as x
Result
The inverse tangent of y/x. E.g. this function can be used to compute the phase of a complex number: phi:=atan(im,re)

See also
tan, asin, acos, complex arithmetic (cr2p, cr2phi)

<function list>

Navigation menu

Personal tools