complex - convert between columns and complex number lists
SYNOPSIS
complex [-fc] [real imaginary] < table
complex [-fc] [real imaginary] < complex_number_list
DESCRIPTION
complex
generates a complex number list from two columns in
table.
By default, the two leftmost columns in
table
are treated as real and imaginary, respectively.
Non-numeric column contents become 0.
complex
is its own inverse:
it also converts a
complex_number_list
into a two-column table.
By default, the columns are named
real
and
imaginary.
OPTIONS
- -fc
- use c (instead of TAB) as the input column
separation character.
- real,
- imaginary
- When the input is a
- table,
real
and
imaginary
are the names of the columns from
table
to be converted.
When the input is a
complex_number_list, the
real
and
imaginary
arguments specify the names of the columns in the resulting table.
EXAMPLES
$ series 1 5
1
2
3
4
5
$ series 1 5 | complex
real imaginary
---- ---------
1 2
3 4
$ series 1 5 | complex | complex imaginary real
2
1
4
3
SEE ALSO