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

Last change on this file since 242 was 242, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers + replace some message by some report

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 1,2,3 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 1,2,3 or 4 dim 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 1)a vector containing indexes of lines we want to keep
147 2)the string '*' if we want to keep all lines.
148
149   
150
151    <a name="#_extrac2_keyword_index2"></a>
152    <h4>index2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
153      <font size="-1" color="#006633">in</font>
154     
155     
156      <font size="-1" color="#006633">required</font>
157     
158     
159     
160     
161    </h4>
162
163   
164 the same thing that index1 but for dim 2.
165
166   
167
168    <a name="#_extrac2_keyword_index3"></a>
169    <h4>index3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
170      <font size="-1" color="#006633">in</font>
171     
172     
173      <font size="-1" color="#006633">required</font>
174     
175     
176     
177     
178    </h4>
179
180   
181 the same thing that index1 but for dim 3.
182
183   
184
185    <a name="#_extrac2_keyword_index4"></a>
186    <h4>index4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
187      <font size="-1" color="#006633">in</font>
188     
189     
190      <font size="-1" color="#006633">required</font>
191     
192     
193     
194     
195    </h4>
196
197   
198 the same thing that index1 but for dim 4.
199
200   
201   
202
203   
204
205    <h3>Examples</h3><pre>
206 I have a dim 2 matrix named A. I want extract a small intersection
207 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])
210
211 other ex:
212 IDL> print, a
213 a b c
214 d e f
215 g h i
216 IDL> print, extrac2(a,[0,2],[0,2])
217 a c
218 g i
219
220    </pre><h3>Version history</h3>
221   
222    <h4>Version</h4>
223 $Id: extrac2.pro 238 2007-03-27 13:43:18Z pinsard $
224
225    <h4>History</h4>
226 Sebastien Masson (smasson@lodyc.jussieu.fr)
227                       12/1/1999
228                       29/4/1999: correction of a bug and complement of the heading
229
230   
231
232    <h3>Known issues</h3>
233   
234   
235   
236    <h4>Restrictions</h4>
237
238
239   
240   
241   
242   
243   
244   
245   
246
247    <font size="-3"><p>&nbsp;</p></font>
248    <hr size="1" color="#CCCCCC"/>
249     
250
251   
252
253    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
254
255  </body>
256</html>
Note: See TracBrowser for help on using the repository browser.