To properly display this page you need a browser with JavaScript support.
HTBasic Help
×
Menu
Index
Search
Search
Reference
HTBasic Keywords
IMAG - Returns the imaginary part of a complex number.
Previous page
Next page
Print version
(c) TransEra Corp, 2021
To properly display this page you need a browser with JavaScript support.
IMAG
Returns the imaginary part of a complex number.
IMAG( numeric-expression )
Usage:
PRINT IMAG(Z)
DRAW REAL(C),IMAG(C)
Example:
IMAG.BAS
Description:
The imaginary part of a complex number is returned with
IMAG
and the real part with
REAL
. To express the parts of a complex number in polar form, use
ABS
and
ARG
:
PRINT "Rectangular form: Real = ";REAL(Z),"Imag =";IMAG(Z)
PRINT "Polar form: Magnitude = ";ABS(Z),"Angle = ";ARG(Z)
See Also:
ABS
,
ARG
,
CMPLX
,
CONJG
,
REAL