1 | |
---|
2 | |
---|
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
---|
4 | <head> |
---|
5 | <title>extrac2.pro (SAXO Documentation Assistant)</title> |
---|
6 | </head> |
---|
7 | |
---|
8 | <body text="#000000" bgcolor="#FFFFFF"> |
---|
9 | |
---|
10 | |
---|
11 | <!-- Navbar template takes a structure with the following fields: |
---|
12 | overview_href : |
---|
13 | overview_selected : |
---|
14 | dir_overview_href : |
---|
15 | dir_overview_selected : |
---|
16 | categories_href : |
---|
17 | categories_selected : |
---|
18 | index_href : |
---|
19 | index_selected : |
---|
20 | search_href : |
---|
21 | search_selected : |
---|
22 | file_selected : |
---|
23 | source_href : |
---|
24 | source_selected : |
---|
25 | help_href : |
---|
26 | help_selected : |
---|
27 | etc_selected : |
---|
28 | |
---|
29 | prev_file_href : |
---|
30 | next_file_href : |
---|
31 | |
---|
32 | view_single_page_href : |
---|
33 | view_frames_href : |
---|
34 | |
---|
35 | summary_fields_href : |
---|
36 | summary_routine_href : |
---|
37 | details_routine_href : |
---|
38 | |
---|
39 | title : |
---|
40 | subtitle : |
---|
41 | user : |
---|
42 | --> |
---|
43 | |
---|
44 | |
---|
45 | <table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom"> |
---|
46 | <tr> |
---|
47 | <td width="10%"> |
---|
48 | <a href="different.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td> |
---|
49 | <td width="80%" align="center" valign="center"> |
---|
50 | <font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td> |
---|
51 | <td width="10%" align="right"> |
---|
52 | <a href="inter.html"><img src="./../next.gif" border="0" alt="Next"></a></td> |
---|
53 | </tr> |
---|
54 | </table> |
---|
55 | |
---|
56 | |
---|
57 | <h1><font size="-2">Matrix/</font></h1> |
---|
58 | <h2>extrac2.pro</h2> |
---|
59 | |
---|
60 | <dl> |
---|
61 | </dl> |
---|
62 | |
---|
63 | |
---|
64 | extraction of subdomains of matrices; |
---|
65 | Even if the subdomain is "pierced" (see the example) |
---|
66 | By default, IDL can make extractions of subdomain: |
---|
67 | |
---|
68 | IDL> a=indgen(5,5) |
---|
69 | IDL> print, a |
---|
70 | 0 1 2 3 4 |
---|
71 | 5 6 7 8 9 |
---|
72 | 10 11 12 13 14 |
---|
73 | 15 16 17 18 19 |
---|
74 | 20 21 22 23 24 |
---|
75 | IDL> print, a[[0,2],3] |
---|
76 | 15 17 |
---|
77 | IDL> print, a[[0,2],*] |
---|
78 | 0 2 |
---|
79 | 5 7 |
---|
80 | 10 12 |
---|
81 | 15 17 |
---|
82 | 20 22 |
---|
83 | but |
---|
84 | IDL> print, a[[0,2],[3,4]] |
---|
85 | 15 22 |
---|
86 | while |
---|
87 | IDL> print, extrac2(a,[0,2],[3,4]) |
---|
88 | 15 17 |
---|
89 | 20 22 |
---|
90 | |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | <a name="#_extrac2"></a> |
---|
96 | |
---|
97 | <h2>extrac2 <font size="-1" color="#006633"> |
---|
98 | Utilities |
---|
99 | </font></h2> |
---|
100 | |
---|
101 | <p><font face="Courier"><i>result = </i>extrac2(<i><a href="#_extrac2_keyword_array">array</a>, <a href="#_extrac2_keyword_index1">index1</a>, <a href="#_extrac2_keyword_index2">index2</a>, <a href="#_extrac2_keyword_index3">index3</a>, <a href="#_extrac2_keyword_index4">index4</a></i>)</font></p> |
---|
102 | |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | <h3>Return value</h3> |
---|
107 | a matrix 1,2,3 or 4d extract from input array |
---|
108 | |
---|
109 | |
---|
110 | |
---|
111 | <h3>Parameters</h3> |
---|
112 | |
---|
113 | |
---|
114 | <a name="#_extrac2_keyword_array"></a> |
---|
115 | <h4>array |
---|
116 | <font size="-1" color="#006633">in</font> |
---|
117 | |
---|
118 | |
---|
119 | <font size="-1" color="#006633">required</font> |
---|
120 | |
---|
121 | |
---|
122 | |
---|
123 | |
---|
124 | </h4> |
---|
125 | |
---|
126 | |
---|
127 | a 1,2,3 or 4 dim input array |
---|
128 | |
---|
129 | |
---|
130 | |
---|
131 | <a name="#_extrac2_keyword_index1"></a> |
---|
132 | <h4>index1 |
---|
133 | <font size="-1" color="#006633">in</font> |
---|
134 | |
---|
135 | |
---|
136 | <font size="-1" color="#006633">required</font> |
---|
137 | |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | </h4> |
---|
142 | |
---|
143 | |
---|
144 | can have 2 forms: |
---|
145 | 1)a vector containing indexes of lines we want to keep |
---|
146 | 2)the string '*' if we want to keep all lines. |
---|
147 | |
---|
148 | |
---|
149 | |
---|
150 | <a name="#_extrac2_keyword_index2"></a> |
---|
151 | <h4>index2 |
---|
152 | <font size="-1" color="#006633">in</font> |
---|
153 | |
---|
154 | |
---|
155 | <font size="-1" color="#006633">required</font> |
---|
156 | |
---|
157 | |
---|
158 | |
---|
159 | |
---|
160 | </h4> |
---|
161 | |
---|
162 | |
---|
163 | the same thing that index1 but for dim 2. |
---|
164 | |
---|
165 | |
---|
166 | |
---|
167 | <a name="#_extrac2_keyword_index3"></a> |
---|
168 | <h4>index3 |
---|
169 | <font size="-1" color="#006633">in</font> |
---|
170 | |
---|
171 | |
---|
172 | <font size="-1" color="#006633">required</font> |
---|
173 | |
---|
174 | |
---|
175 | |
---|
176 | |
---|
177 | </h4> |
---|
178 | |
---|
179 | |
---|
180 | the same thing that index1 but for dim 3. |
---|
181 | |
---|
182 | |
---|
183 | |
---|
184 | <a name="#_extrac2_keyword_index4"></a> |
---|
185 | <h4>index4 |
---|
186 | <font size="-1" color="#006633">in</font> |
---|
187 | |
---|
188 | |
---|
189 | <font size="-1" color="#006633">required</font> |
---|
190 | |
---|
191 | |
---|
192 | |
---|
193 | |
---|
194 | </h4> |
---|
195 | |
---|
196 | |
---|
197 | the same thing that index1 but for dim 4. |
---|
198 | |
---|
199 | |
---|
200 | |
---|
201 | |
---|
202 | |
---|
203 | |
---|
204 | <h3>Examples</h3> |
---|
205 | I have a dim 2 matrix named A. I want extract a small intersection |
---|
206 | matrix 2d of the line 2,3 and 7 and of the column 0 and 1: |
---|
207 | |
---|
208 | IDL> res=extrac2(A,[2,3,7],[0,1]) |
---|
209 | |
---|
210 | other ex: |
---|
211 | IDL> print, a |
---|
212 | a b c |
---|
213 | d e f |
---|
214 | g h i |
---|
215 | IDL> print, extrac2(a,[0,2],[0,2]) |
---|
216 | a c |
---|
217 | g i |
---|
218 | |
---|
219 | <h3>Version history</h3> |
---|
220 | |
---|
221 | <h4>Version</h4> $Id: extrac2.pro 157 2006-08-21 09:01:50Z navarro $ |
---|
222 | |
---|
223 | <h4>History</h4> Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
224 | 12/1/1999 |
---|
225 | 29/4/1999: correction of a bug and complement of the heading |
---|
226 | |
---|
227 | |
---|
228 | |
---|
229 | <h3>Known issues</h3> |
---|
230 | |
---|
231 | |
---|
232 | |
---|
233 | <h4>Restrictions</h4> |
---|
234 | -1 in case of mistake |
---|
235 | |
---|
236 | |
---|
237 | |
---|
238 | |
---|
239 | |
---|
240 | |
---|
241 | |
---|
242 | |
---|
243 | |
---|
244 | |
---|
245 | <font size="-3"><p> </p></font> |
---|
246 | <hr size="1" color="#CCCCCC"/> |
---|
247 | |
---|
248 | |
---|
249 | |
---|
250 | |
---|
251 | <p><font color="gray" size="-3"> Produced by IDLdoc 2.0 on Tue Aug 29 14:49:22 2006.</font></p> |
---|
252 | |
---|
253 | </body> |
---|
254 | </html> |
---|