can have 2 forms:
1)a vector containing indexes of lines we want to keep
2)the string '*' if we want to keep all lines.
index2
inrequired
the same thing that index1 but for dim 2.
index3
inrequired
the same thing that index1 but for dim 3.
index4
inrequired
the same thing that index1 but for dim 4.
Examples
I have a dim 2 matrix named A. I want extract a small intersection
matrix 2d of the line 2,3 and 7 and of the column 0 and 1:
IDL> res=extrac2(A,[2,3,7],[0,1])
other ex:
IDL> print, a
a b c
d e f
g h i
IDL> print, extrac2(a,[0,2],[0,2])
a c
g i