- Timestamp:
- 07/23/09 11:18:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Documentation/idldoc_html_output/Matrix/extrac2.html
r338 r402 92 92 By default, IDL can make extractions of subdomain: 93 93 94 95 94 IDL> a=indgen(5,5) 95 IDL> print, a 96 96 0 1 2 3 4 97 97 5 6 7 8 9 … … 99 99 15 16 17 18 19 100 100 20 21 22 23 24 101 101 IDL> print, a[[0,2],3] 102 102 15 17 103 103 IDL> print, a[[0,2],*] 104 104 0 2 105 105 5 7 … … 108 108 20 22 109 109 but 110 110 IDL> print, a[[0,2],[3,4]] 111 111 15 22 112 112 while 113 113 IDL> print, extrac2(a,[0,2],[3,4]) 114 114 15 17 115 115 20 22 … … 140 140 141 141 <h3>Return value</h3><div class="preformat"> 142 a matrix 1 ,2,3or 4d extract from input array142 a matrix 1d, 2d, 3d or 4d extract from input array 143 143 -1 in case of mistake 144 144 </div> … … 160 160 161 161 <div class="comments"> 162 a 1 ,2,3 or 4 diminput array162 a 1d, 2d, 3d or 4d input array 163 163 </div> 164 164 … … 176 176 <div class="comments"> 177 177 can have 2 forms: 178 1)a vector containing indexes of lines we want to keep 179 2)the string '*' if we want to keep all lines. 178 179 1) a vector containing indexes of lines we want to keep 180 2) the string '*' if we want to keep all lines. 180 181 </div> 181 182 … … 231 232 232 233 <h3>Examples</h3><div class="preformat"> 233 I have a dim 2matrix named A. I want extract a small intersection234 matrix 2d of the line 2, 3 and 7 and of the column 0 and 1:235 236 IDL> res=extrac2(A,[2,3,7],[0,1])234 I have a 2d matrix named A. I want extract a small intersection 235 matrix 2d of the line 2, 3 and 7 and of the column 0 and 1: 236 237 IDL> res=extrac2(A,[2,3,7],[0,1]) 237 238 238 239 other ex: 239 IDL> print, a 240 IDL> a=[['a','b','c'],['d','e','f'],['g','h','i']] 241 IDL> print, a 240 242 a b c 241 243 d e f 242 244 g h i 243 IDL> print, extrac2(a,[0,2],[0,2])245 IDL> print, extrac2(a,[0,2],[0,2]) 244 246 a c 245 247 g i … … 248 250 249 251 <h4>Version</h4><div class="preformat"> 250 $Id: extrac2.pro 3 25 2007-12-06 10:04:53Z pinsard $252 $Id: extrac2.pro 373 2008-08-08 14:11:31Z pinsard $ 251 253 </div> 252 254 <h4>History</h4><div class="preformat"> 253 255 Sebastien Masson (smasson@lodyc.jussieu.fr) 254 255 256 - 12/1/1999 257 - 29/4/1999: correction of a bug and complement of the heading 256 258 </div> 257 259
Note: See TracChangeset
for help on using the changeset viewer.