a matrix 1d, 2d, 3d or 4d extract from tab
-1 in case of mistake
Parameters
tab
inrequired
a 1d, 2d, 3d or 4d table
indicex
inrequired
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.
indicey
inrequired
the same thing that indicex but for dim 2.
indicez
inrequired
the same thing that indicex but for dim 3.
indicet
inrequired
the same thing that indicex 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=extrait(A,[2,3,7],[0,1])
other ex:
IDL> print, a
a b c
d e f
g h i
IDL> print, extrait(a,[0,2],[0,2])
a c
g i