Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: math
See also: csort

Quantlet: csortcol
Description: sorts with respect to either a real part of a column or an imaginary part of a column c. If 1 <= c <= cols(xr) it sorts after the real part of x, if cols(xr) < c <= cols(xr)+cols(xi) it sorts the imaginary part after column c-cols(xr).

Usage: z = csortcol(x, c)
Input:
x n x p x d1 x ... x dn complex array
c scalar column of x
Output:
z n x p x d1 x ... x dn array real part of sorted x

Example:

library("math")

x = complex (#(1,2)~#(2,3), #(2,1)~#(1,1))

c  = 3

csortcol(x, c)

Result:



Contents of z.re

[1,]        2        3 

[2,]        1        2 

Contents of z.im

[1,]        1        1 

[2,]        2        1   


Library: math
See also: csort

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Author: Sigbert Klinke, 920424, 970529, Susanne Hannappel, 960423
(C) MD*TECH Method and Data Technologies, 21.9.2000