- Timestamp:
- 07/23/09 11:18:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_assistant_output/Matrix/extrac2.html
r338 r402 66 66 By default, IDL can make extractions of subdomain: 67 67 68 69 68 IDL> a=indgen(5,5) 69 IDL> print, a 70 70 0 1 2 3 4 71 71 5 6 7 8 9 … … 73 73 15 16 17 18 19 74 74 20 21 22 23 24 75 75 IDL> print, a[[0,2],3] 76 76 15 17 77 77 IDL> print, a[[0,2],*] 78 78 0 2 79 79 5 7 … … 82 82 20 22 83 83 but 84 84 IDL> print, a[[0,2],[3,4]] 85 85 15 22 86 86 while 87 87 IDL> print, extrac2(a,[0,2],[3,4]) 88 88 15 17 89 89 20 22 … … 105 105 106 106 <h3>Return value</h3> 107 a matrix 1 ,2,3or 4d extract from input array107 a matrix 1d, 2d, 3d or 4d extract from input array 108 108 -1 in case of mistake 109 109 … … 126 126 127 127 128 a 1 ,2,3 or 4 diminput array128 a 1d, 2d, 3d or 4d input array 129 129 130 130 … … 144 144 145 145 can have 2 forms: 146 1)a vector containing indexes of lines we want to keep 147 2)the string '*' if we want to keep all lines. 146 147 1) a vector containing indexes of lines we want to keep 148 2) the string '*' if we want to keep all lines. 148 149 149 150 … … 204 205 205 206 <h3>Examples</h3><pre> 206 I have a dim 2matrix named A. I want extract a small intersection207 matrix 2d of the line 2, 3 and 7 and of the column 0 and 1:208 209 IDL> res=extrac2(A,[2,3,7],[0,1])207 I have a 2d matrix named A. I want extract a small intersection 208 matrix 2d of the line 2, 3 and 7 and of the column 0 and 1: 209 210 IDL> res=extrac2(A,[2,3,7],[0,1]) 210 211 211 212 other ex: 212 IDL> print, a 213 IDL> a=[['a','b','c'],['d','e','f'],['g','h','i']] 214 IDL> print, a 213 215 a b c 214 216 d e f 215 217 g h i 216 IDL> print, extrac2(a,[0,2],[0,2])218 IDL> print, extrac2(a,[0,2],[0,2]) 217 219 a c 218 220 g i … … 221 223 222 224 <h4>Version</h4> 223 $Id: extrac2.pro 3 25 2007-12-06 10:04:53Z pinsard $225 $Id: extrac2.pro 373 2008-08-08 14:11:31Z pinsard $ 224 226 225 227 <h4>History</h4> 226 228 Sebastien Masson (smasson@lodyc.jussieu.fr) 227 228 229 - 12/1/1999 230 - 29/4/1999: correction of a bug and complement of the heading 229 231 230 232
Note: See TracChangeset
for help on using the changeset viewer.