source: trunk/SRC/Documentation/idldoc_assistant_output/Matrix/extrac2.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

File size: 5.2 KB
Line 
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 1d, 2d, 3d or 4d extract from input array
108 -1 in case of mistake
109
110
111   
112    <h3>Parameters</h3>
113   
114
115    <a name="#_extrac2_keyword_array"></a>
116    <h4>array&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
117      <font size="-1" color="#006633">in</font>
118     
119     
120      <font size="-1" color="#006633">required</font>
121     
122     
123     
124     
125    </h4>
126
127   
128 a 1d, 2d, 3d or 4d input array
129
130   
131
132    <a name="#_extrac2_keyword_index1"></a>
133    <h4>index1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
134      <font size="-1" color="#006633">in</font>
135     
136     
137      <font size="-1" color="#006633">required</font>
138     
139     
140     
141     
142    </h4>
143
144   
145 can have 2 forms:
146
147  1) a vector containing indexes of lines we want to keep
148  2) the string '*' if we want to keep all lines.
149
150   
151
152    <a name="#_extrac2_keyword_index2"></a>
153    <h4>index2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
154      <font size="-1" color="#006633">in</font>
155     
156     
157      <font size="-1" color="#006633">required</font>
158     
159     
160     
161     
162    </h4>
163
164   
165 the same thing that index1 but for dim 2.
166
167   
168
169    <a name="#_extrac2_keyword_index3"></a>
170    <h4>index3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
171      <font size="-1" color="#006633">in</font>
172     
173     
174      <font size="-1" color="#006633">required</font>
175     
176     
177     
178     
179    </h4>
180
181   
182 the same thing that index1 but for dim 3.
183
184   
185
186    <a name="#_extrac2_keyword_index4"></a>
187    <h4>index4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
188      <font size="-1" color="#006633">in</font>
189     
190     
191      <font size="-1" color="#006633">required</font>
192     
193     
194     
195     
196    </h4>
197
198   
199 the same thing that index1 but for dim 4.
200
201   
202   
203
204   
205
206    <h3>Examples</h3><pre>
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])
211
212 other ex:
213   IDL> a=[['a','b','c'],['d','e','f'],['g','h','i']]
214   IDL> print, a
215 a b c
216 d e f
217 g h i
218   IDL> print, extrac2(a,[0,2],[0,2])
219 a c
220 g i
221
222    </pre><h3>Version history</h3>
223   
224    <h4>Version</h4>
225 $Id: extrac2.pro 373 2008-08-08 14:11:31Z pinsard $
226
227    <h4>History</h4>
228 Sebastien Masson (smasson@lodyc.jussieu.fr)
229  - 12/1/1999
230  - 29/4/1999: correction of a bug and complement of the heading
231
232   
233
234    <h3>Known issues</h3>
235   
236   
237   
238    <h4>Restrictions</h4>
239
240
241   
242   
243   
244   
245   
246   
247   
248
249    <font size="-3"><p>&nbsp;</p></font>
250    <hr size="1" color="#CCCCCC"/>
251     
252
253   
254
255    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
256
257  </body>
258</html>
Note: See TracBrowser for help on using the repository browser.