Obsolete/
extrait.pro
extraction of subdomains of matrices;
Even if the subdomain is "pierced" (see the example)
By default, IDL can make extractions of subdomain:
IDL> a=indgen(5,5)
IDL> print, a
0 1 2 3 4
5 6 7 8 9
10 11 12 13 14
15 16 17 18 19
20 21 22 23 24
IDL> print, a[[0,2],3]
15 17
IDL> print, a[[0,2],*]
0 2
5 7
10 12
15 17
20 22
but
IDL> print, a[[0,2],[3,4]]
15 22
while
IDL> print, extrait(a,[0,2],[3,4])
15 17
20 22
you better use extrac2
extrait obsolete
Utilities
result = extrait(tab, indicex, indicey, indicez, indicet)
Return value
a matrix 1,2,3 or 4d extract from tab
Parameters
tab
in
required
a 1,2,3 or 4 dim table
indicex
in
required
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
in
required
the same thing that indicex but for dim 2.
indicez
in
required
the same thing that indicex but for dim 3.
indicet
in
required
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
Version history
Version
$Id: extrait.pro 157 2006-08-21 09:01:50Z navarro $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
12/1/1999
29/4/1999: correction of a bug and complement of the heading
Known issues
Obsolete
Restrictions
res=-1 in case of mistake
Produced by IDLdoc 2.0 on Tue Aug 29 14:49:24 2006.