Changeset 231 for trunk/SRC/Obsolete/extrait.pro
- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Obsolete/extrait.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 7 ; extraction of subdomains of matrices; 3 ; @file_comments 4 ; extraction of subdomains of matrices; 8 5 ; Even if the subdomain is "pierced" (see the example) 9 6 ; By default, IDL can make extractions of subdomain: 10 7 ; 11 ; IDL> a=indgen(5,5) 12 ; IDL> print, a 8 ; IDL> a=indgen(5,5) 9 ; IDL> print, a 13 10 ; 0 1 2 3 4 14 11 ; 5 6 7 8 9 … … 16 13 ; 15 16 17 18 19 17 14 ; 20 21 22 23 24 18 ; IDL> print, a[[0,2],3] 15 ; IDL> print, a[[0,2],3] 19 16 ; 15 17 20 ; IDL> print, a[[0,2],*] 17 ; IDL> print, a[[0,2],*] 21 18 ; 0 2 22 19 ; 5 7 … … 25 22 ; 20 22 26 23 ; but 27 ; IDL> print, a[[0,2],[3,4]] 24 ; IDL> print, a[[0,2],[3,4]] 28 25 ; 15 22 29 26 ; while 30 ; IDL> print, extrait(a,[0,2],[3,4]) 27 ; IDL> print, extrait(a,[0,2],[3,4]) 31 28 ; 15 17 32 29 ; 20 22 … … 37 34 ; @obsolete 38 35 ; 39 ; @categories 36 ; @categories 40 37 ; Utilities 41 38 ; 42 ; @param tab {in}{required} 39 ; @param tab {in}{required} 43 40 ; a 1,2,3 or 4 dim table 44 41 ; 45 ; @param indicex {in}{required} 42 ; @param indicex {in}{required} 46 43 ; can have 2 forms: 47 44 ; 1)a vector containing indexes of lines we want to keep 48 45 ; 2)the string '*' if we want to keep all lines. 49 46 ; 50 ; @param indicey {in}{required} 47 ; @param indicey {in}{required} 51 48 ; the same thing that indicex but for dim 2. 52 49 ; 53 ; @param indicez {in}{required} 50 ; @param indicez {in}{required} 54 51 ; the same thing that indicex but for dim 3. 55 ; 56 ; @param indicet {in}{required} 52 ; 53 ; @param indicet {in}{required} 57 54 ; the same thing that indicex but for dim 4. 58 55 ; 59 ; @returns 56 ; @returns 60 57 ; a matrix 1,2,3 or 4d extract from tab 58 ; -1 in case of mistake 61 59 ; 62 ; @restrictions 63 ; res=-1 in case of mistake 64 ; 65 ; @examples 66 ; I have a dim 2 matrix named A. I want extract a small intersection 60 ; @examples 61 ; I have a dim 2 matrix named A. I want extract a small intersection 67 62 ; matrix 2d of the line 2,3 and 7 and of the column 0 and 1: 68 ; 63 ; 69 64 ; IDL> res=extrait(A,[2,3,7],[0,1]) 70 65 ; 71 66 ; other ex: 72 ; IDL> print, a 67 ; IDL> print, a 73 68 ; a b c 74 69 ; d e f 75 70 ; g h i 76 ; IDL> print, extrait(a,[0,2],[0,2]) 71 ; IDL> print, extrait(a,[0,2],[0,2]) 77 72 ; a c 78 73 ; g i 79 ; 74 ; 80 75 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 81 76 ; 12/1/1999 … … 85 80 ; 86 81 ;- 87 ;------------------------------------------------------------ 88 ;------------------------------------------------------------ 89 ;------------------------------------------------------------ 82 ; 90 83 FUNCTION extrait, tab, indicex, indicey, indicez, indicet 91 ;------------------------------------------------------------92 84 ; 93 85 compile_opt idl2, strictarrsubs
Note: See TracChangeset
for help on using the changeset viewer.