[138] | 1 | |
---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
| 3 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
| 4 | |
---|
| 5 | <!-- Generated by IDLdoc 2.0 --> |
---|
| 6 | |
---|
| 7 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
| 8 | <head> |
---|
| 9 | <title>extrac2.pro (SAXO Documentation)</title> |
---|
| 10 | |
---|
| 11 | |
---|
[191] | 12 | <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" /> |
---|
| 13 | <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" /> |
---|
[138] | 14 | |
---|
| 15 | |
---|
| 16 | <script type="text/javascript"> |
---|
| 17 | function setTitle() { |
---|
| 18 | parent.document.title="extrac2.pro (SAXO Documentation)"; |
---|
| 19 | } |
---|
| 20 | </script> |
---|
| 21 | </head> |
---|
| 22 | |
---|
| 23 | <body onload="setTitle();"> |
---|
| 24 | |
---|
| 25 | <div id="navbar_title"> |
---|
| 26 | <h1>SAXO Documentation</h1> |
---|
| 27 | </div> |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | <div id="main_navbar"> |
---|
| 31 | |
---|
| 32 | <table cellspacing="0"> |
---|
| 33 | <tr> |
---|
| 34 | |
---|
[189] | 35 | <td><a href="./../overview.html" title="Overview of library">Overview</a></td> |
---|
[138] | 36 | |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | <td >Directory</td> |
---|
| 40 | |
---|
| 41 | |
---|
| 42 | |
---|
[189] | 43 | <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td> |
---|
[138] | 44 | |
---|
| 45 | |
---|
| 46 | |
---|
[189] | 47 | <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td> |
---|
[138] | 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[189] | 51 | <td><a href="./../search-page.html" title="Search library">Search</a></td> |
---|
[138] | 52 | |
---|
| 53 | |
---|
| 54 | <td id="selected">File</td> |
---|
| 55 | |
---|
| 56 | |
---|
[189] | 57 | <td><a href="../../../Matrix//extrac2.pro" title="Source code of a file">Source</a></td> |
---|
[138] | 58 | |
---|
| 59 | |
---|
| 60 | |
---|
[189] | 61 | <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td> |
---|
[138] | 62 | |
---|
| 63 | |
---|
| 64 | <td >Etc</td> |
---|
| 65 | |
---|
| 66 | <td id="flexible">Developer documentation</td> |
---|
| 67 | </tr> |
---|
| 68 | </table> |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div id="secondary_navbar"> |
---|
| 73 | |
---|
[189] | 74 | <a href="different.html"><<prev file</a> | <a href="inter.html">next file >></a> <a href="extrac2.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a> summary: fields | routine details: <a href="#routine_details">routine</a> |
---|
[138] | 75 | |
---|
| 76 | </div> |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | <div id="container"> |
---|
| 80 | |
---|
[189] | 81 | <h1 class="directory"><a href="directory-overview.html">Matrix/</a></h1> |
---|
[138] | 82 | <h2 class="pro_file">extrac2.pro</h2> |
---|
| 83 | |
---|
| 84 | <div id="file_attr"> |
---|
| 85 | <dl> |
---|
| 86 | </dl> |
---|
| 87 | </div> |
---|
| 88 | |
---|
| 89 | <div id="file_comments"> |
---|
[163] | 90 | extraction of subdomains of matrices; |
---|
[138] | 91 | Even if the subdomain is "pierced" (see the example) |
---|
| 92 | By default, IDL can make extractions of subdomain: |
---|
| 93 | |
---|
[402] | 94 | IDL> a=indgen(5,5) |
---|
| 95 | IDL> print, a |
---|
[138] | 96 | 0 1 2 3 4 |
---|
| 97 | 5 6 7 8 9 |
---|
| 98 | 10 11 12 13 14 |
---|
| 99 | 15 16 17 18 19 |
---|
| 100 | 20 21 22 23 24 |
---|
[402] | 101 | IDL> print, a[[0,2],3] |
---|
[138] | 102 | 15 17 |
---|
[402] | 103 | IDL> print, a[[0,2],*] |
---|
[138] | 104 | 0 2 |
---|
| 105 | 5 7 |
---|
| 106 | 10 12 |
---|
| 107 | 15 17 |
---|
| 108 | 20 22 |
---|
| 109 | but |
---|
[402] | 110 | IDL> print, a[[0,2],[3,4]] |
---|
[138] | 111 | 15 22 |
---|
| 112 | while |
---|
[402] | 113 | IDL> print, extrac2(a,[0,2],[3,4]) |
---|
[138] | 114 | 15 17 |
---|
| 115 | 20 22 |
---|
| 116 | </div> |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | |
---|
| 125 | |
---|
| 126 | <div id="routine_details"> |
---|
| 127 | |
---|
| 128 | |
---|
| 129 | <div class="routine_details" id="_extrac2"> |
---|
| 130 | |
---|
[242] | 131 | <h2><a class="top" href="#container">top</a>extrac2 <span class="categories"> |
---|
[157] | 132 | Utilities |
---|
[138] | 133 | </span></h2> |
---|
| 134 | |
---|
| 135 | <p class="header"> |
---|
| 136 | <span class="result">result = </span>extrac2(<span class="result"><a href="#_extrac2_param_array">array</a>, <a href="#_extrac2_param_index1">index1</a>, <a href="#_extrac2_param_index2">index2</a>, <a href="#_extrac2_param_index3">index3</a>, <a href="#_extrac2_param_index4">index4</a></span>)</p> |
---|
| 137 | |
---|
| 138 | <div class="comments"> |
---|
| 139 | </div> |
---|
| 140 | |
---|
| 141 | <h3>Return value</h3><div class="preformat"> |
---|
[402] | 142 | a matrix 1d, 2d, 3d or 4d extract from input array |
---|
[234] | 143 | -1 in case of mistake |
---|
[138] | 144 | </div> |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | <h3>Parameters</h3> |
---|
| 148 | |
---|
| 149 | |
---|
| 150 | <h4 id="_extrac2_param_array">array |
---|
| 151 | <span class="attr">in</span> |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | <span class="attr">required</span> |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | </h4> |
---|
| 160 | |
---|
| 161 | <div class="comments"> |
---|
[402] | 162 | a 1d, 2d, 3d or 4d input array |
---|
[138] | 163 | </div> |
---|
| 164 | |
---|
| 165 | <h4 id="_extrac2_param_index1">index1 |
---|
| 166 | <span class="attr">in</span> |
---|
| 167 | |
---|
| 168 | |
---|
| 169 | <span class="attr">required</span> |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | </h4> |
---|
| 175 | |
---|
| 176 | <div class="comments"> |
---|
| 177 | can have 2 forms: |
---|
[402] | 178 | |
---|
| 179 | 1) a vector containing indexes of lines we want to keep |
---|
| 180 | 2) the string '*' if we want to keep all lines. |
---|
[138] | 181 | </div> |
---|
| 182 | |
---|
| 183 | <h4 id="_extrac2_param_index2">index2 |
---|
| 184 | <span class="attr">in</span> |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | <span class="attr">required</span> |
---|
| 188 | |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | |
---|
| 192 | </h4> |
---|
| 193 | |
---|
| 194 | <div class="comments"> |
---|
| 195 | the same thing that index1 but for dim 2. |
---|
| 196 | </div> |
---|
| 197 | |
---|
| 198 | <h4 id="_extrac2_param_index3">index3 |
---|
| 199 | <span class="attr">in</span> |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | <span class="attr">required</span> |
---|
| 203 | |
---|
| 204 | |
---|
| 205 | |
---|
| 206 | |
---|
| 207 | </h4> |
---|
| 208 | |
---|
| 209 | <div class="comments"> |
---|
| 210 | the same thing that index1 but for dim 3. |
---|
| 211 | </div> |
---|
| 212 | |
---|
| 213 | <h4 id="_extrac2_param_index4">index4 |
---|
| 214 | <span class="attr">in</span> |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | <span class="attr">required</span> |
---|
| 218 | |
---|
| 219 | |
---|
| 220 | |
---|
| 221 | |
---|
| 222 | </h4> |
---|
| 223 | |
---|
| 224 | <div class="comments"> |
---|
| 225 | the same thing that index1 but for dim 4. |
---|
| 226 | </div> |
---|
| 227 | |
---|
| 228 | |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | <h3>Examples</h3><div class="preformat"> |
---|
[402] | 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: |
---|
[242] | 236 | |
---|
[402] | 237 | IDL> res=extrac2(A,[2,3,7],[0,1]) |
---|
[138] | 238 | |
---|
| 239 | other ex: |
---|
[402] | 240 | IDL> a=[['a','b','c'],['d','e','f'],['g','h','i']] |
---|
| 241 | IDL> print, a |
---|
[138] | 242 | a b c |
---|
| 243 | d e f |
---|
| 244 | g h i |
---|
[402] | 245 | IDL> print, extrac2(a,[0,2],[0,2]) |
---|
[138] | 246 | a c |
---|
| 247 | g i |
---|
| 248 | </div> |
---|
| 249 | <h3>Version history</h3> |
---|
| 250 | |
---|
[242] | 251 | <h4>Version</h4><div class="preformat"> |
---|
[402] | 252 | $Id: extrac2.pro 373 2008-08-08 14:11:31Z pinsard $ |
---|
[138] | 253 | </div> |
---|
[242] | 254 | <h4>History</h4><div class="preformat"> |
---|
| 255 | Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
[402] | 256 | - 12/1/1999 |
---|
| 257 | - 29/4/1999: correction of a bug and complement of the heading |
---|
[138] | 258 | </div> |
---|
| 259 | |
---|
| 260 | |
---|
| 261 | <h3>Known issues</h3> |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | <h4>Restrictions</h4><div class="preformat"> |
---|
| 266 | </div> |
---|
| 267 | |
---|
| 268 | |
---|
| 269 | |
---|
| 270 | |
---|
| 271 | |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | |
---|
[163] | 276 | <h3>Statistics</h3> |
---|
| 277 | <table class="statistics"> |
---|
| 278 | <tr><td>McCabe cyclic</td><td> 14</td></tr> |
---|
| 279 | <tr><td>McCabe essential</td><td> 1</td></tr> |
---|
| 280 | <tr><td>McCabe modular design</td><td> 1</td></tr> |
---|
| 281 | </table> |
---|
[138] | 282 | |
---|
| 283 | |
---|
| 284 | </div> |
---|
| 285 | |
---|
| 286 | </div> |
---|
| 287 | |
---|
| 288 | |
---|
| 289 | |
---|
| 290 | <div id="tagline">Produced by IDLdoc 2.0.</div> |
---|
| 291 | |
---|
| 292 | </div> |
---|
| 293 | |
---|
| 294 | </body> |
---|
[249] | 295 | </html> |
---|