]> Creatis software - CreaPhase.git/blob - octave_packages/general-1.3.1/doc-cache
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / general-1.3.1 / doc-cache
1 # Created by Octave 3.6.1, Thu May 17 20:15:05 2012 UTC <root@brouzouf>
2 # name: cache
3 # type: cell
4 # rows: 3
5 # columns: 8
6 # name: <cell-element>
7 # type: sq_string
8 # elements: 1
9 # length: 9
10 adresamp2
11
12
13 # name: <cell-element>
14 # type: sq_string
15 # elements: 1
16 # length: 342
17  -- Function File: [XS, YS] = adresamp2 (X, Y, N, EPS)
18      Perform an adaptive resampling of a planar curve.  The arrays X
19      and Y specify x and y coordinates of the points of the curve.  On
20      return, the same curve is approximated by XS, YS that have length N
21      and the angles between successive segments are approximately equal.
22
23
24
25
26 # name: <cell-element>
27 # type: sq_string
28 # elements: 1
29 # length: 49
30 Perform an adaptive resampling of a planar curve.
31
32
33
34 # name: <cell-element>
35 # type: sq_string
36 # elements: 1
37 # length: 5
38 majle
39
40
41 # name: <cell-element>
42 # type: sq_string
43 # elements: 1
44 # length: 3339
45 MAJLE   (Weak) Majorization check
46     S = MAJLE(X,Y) checks if the real part of X is (weakly) majorized by
47     the real part of Y, where X and Y must be numeric (full or sparse)
48     arrays. It returns S=0, if there is no weak majorization of X by Y,
49     S=1, if there is a weak majorization of X by Y, or S=2, if there is a
50     strong majorization of X by Y. The shapes of X and Y are ignored.
51     NUMEL(X) and NUMEL(Y) may be different, in which case one of them is
52     appended with zeros to match the sizes with the other and, in case of
53     any negative components, a special warning is issued.  
54
55     S = MAJLE(X,Y,MAJLETOL) allows in addition to specify the tolerance in
56     all inequalities [S,Z] = MAJLE(X,Y,MAJLETOL) also outputs a row vector
57     Z, which appears in the definition of the (weak) majorization. In the
58     traditional case, where the real vectors X and Y are of the same size,
59     Z = CUMSUM(SORT(Y,'descend')-SORT(X,'descend')). Here, X is weakly
60     majorized by Y, if MIN(Z)>0, and strongly majorized if MIN(Z)=0, see
61     http://en.wikipedia.org/wiki/Majorization
62
63     The value of MAJLETOL depends on how X and Y have been computed, i.e.,
64     on what the level of error in X or Y is. A good minimal starting point
65     should be MAJLETOL=eps*MAX(NUMEL(X),NUMEL(Y)). The default is 0. 
66
67     % Examples:
68     x = [2 2 2]; y = [1 2 3]; s = majle(x,y)
69     % returns the value 2.
70     x = [2 2 2]; y = [1 2 4]; s = majle(x,y)
71     % returns the value 1.
72     x = [2 2 2]; y = [1 2 2]; s = majle(x,y)
73     % returns the value 0.
74     x = [2 2 2]; y = [1 2 2]; [s,z] = majle(x,y)
75     % also returns the vector z = [ 0 0 -1].
76     x = [2 2 2]; y = [1 2 2]; s = majle(x,y,1)
77     % returns the value 2.
78     x = [2 2]; y = [1 2 2]; s = majle(x,y)
79     % returns the value 1 and warns on tailing with zeros
80     x = [2 2]; y = [-1 2 2]; s = majle(x,y)
81     % returns the value 0 and gives two warnings on tailing with zeros
82     x = [2 -inf]; y = [4 inf]; [s,z] = majle(x,y)
83     % returns s = 1 and z = [Inf   Inf].
84     x = [2 inf]; y = [4 inf]; [s,z] = majle(x,y)
85     % returns  s = 1 and z = [NaN NaN] and a warning on NaNs in z.
86     x=speye(2); y=sparse([0 2; -1 1]); s = majle(x,y) 
87     % returns the value 2.
88     x = [2 2; 2 2]; y = [1 3 4]; [s,z] = majle(x,y) %and 
89     x = [2 2; 2 2]+i; y = [1 3 4]-2*i; [s,z] = majle(x,y)
90     % both return s = 2 and z = [2 3 2 0]. 
91     x = [1 1 1 1 0]; y = [1 1 1 1 1 0 0]'; s = majle(x,y)
92     % returns the value 1 and warns on tailing with zeros
93
94     % One can use this function to check numerically the validity of the
95     Schur-Horn,Lidskii-Mirsky-Wielandt, and Gelfand-Naimark theorems: 
96     clear all; n=100; majleTol=n*n*eps;
97     A = randn(n,n); A = A'+A; eA = -sort(-eig(A)); dA = diag(A);
98     majle(dA,eA,majleTol) % returns the value 2
99     % which is the Schur-Horn theorem; and 
100     B=randn(n,n); B=B'+B; eB=-sort(-eig(B)); 
101     eAmB=-sort(-eig(A-B));
102     majle(eA-eB,eAmB,majleTol) % returns the value 2 
103     % which is the Lidskii-Mirsky-Wielandt theorem; finally
104     A = randn(n,n); sA = -sort(-svd(A)); 
105     B = randn(n,n); sB = -sort(-svd(B));
106     sAB = -sort(-svd(A*B));
107     majle(log2(sAB)-log2(sA), log2(sB), majleTol) % retuns the value 2
108     majle(log2(sAB)-log2(sB), log2(sA), majleTol) % retuns the value 2
109     % which are the log versions of the Gelfand-Naimark theorems
110
111
112
113 # name: <cell-element>
114 # type: sq_string
115 # elements: 1
116 # length: 80
117 MAJLE   (Weak) Majorization check
118     S = MAJLE(X,Y) checks if the real part of X 
119
120
121
122 # name: <cell-element>
123 # type: sq_string
124 # elements: 1
125 # length: 11
126 pararrayfun
127
128
129 # name: <cell-element>
130 # type: sq_string
131 # elements: 1
132 # length: 1005
133  -- Function File: [O1, O2, ...] = pararrayfun (NPROC, FUN, A1, A2, ...)
134  -- Function File:  pararrayfun (nproc, fun, ..., "UniformOutput", VAL)
135  -- Function File:  pararrayfun (nproc, fun, ..., "ErrorHandler",
136           ERRFUNC)
137      Evaluates a function for corresponding elements of an array.
138      Argument and options handling is analogical to `parcellfun',
139      except that arguments are arrays rather than cells. If cells occur
140      as arguments, they are treated as arrays of singleton cells.
141      Arrayfun supports one extra option compared to parcellfun:
142      "Vectorized".  This option must be given together with
143      "ChunksPerProc" and it indicates that FUN is able to operate on
144      vectors rather than just scalars, and returns a vector. The same
145      must be true for ERRFUNC, if given.  In this case, the array is
146      split into chunks which are then directly served to FUNC for
147      evaluation, and the results are concatenated to output arrays.
148
149      See also: parcellfun, arrayfun
150
151
152
153
154
155 # name: <cell-element>
156 # type: sq_string
157 # elements: 1
158 # length: 60
159 Evaluates a function for corresponding elements of an array.
160
161
162
163 # name: <cell-element>
164 # type: sq_string
165 # elements: 1
166 # length: 10
167 parcellfun
168
169
170 # name: <cell-element>
171 # type: sq_string
172 # elements: 1
173 # length: 2496
174  -- Function File: [O1, O2, ...] = parcellfun (NPROC, FUN, A1, A2, ...)
175  -- Function File:  parcellfun (nproc, fun, ..., "UniformOutput", VAL)
176  -- Function File:  parcellfun (nproc, fun, ..., "ErrorHandler",
177           ERRFUNC)
178  -- Function File:  parcellfun (nproc, fun, ..., "VerboseLevel", VAL)
179  -- Function File:  parcellfun (nproc, fun, ..., "ChunksPerProc", VAL)
180      Evaluates a function for multiple argument sets using multiple
181      processes.  NPROC should specify the number of processes. A
182      maximum recommended value is equal to number of CPUs on your
183      machine or one less.  FUN is a function handle pointing to the
184      requested evaluating function.  A1, A2 etc. should be cell arrays
185      of equal size.  O1, O2 etc. will be set to corresponding output
186      arguments.
187
188      The UniformOutput and ErrorHandler options are supported with
189      meaning identical to "cellfun".  A VerboseLevel option controlling
190      the level output is supported.  A value of 0 is quiet, 1 is
191      normal, and 2 or more enables debugging output.  The ChunksPerProc
192      option control the number of chunks which contains elementary
193      jobs. This option particularly useful when time execution of
194      function is small. Setting this option to 100 is a good choice in
195      most cases.
196
197      Notice that jobs are served from a single first-come first-served
198      queue, so the number of jobs executed by each process is generally
199      unpredictable.  This means, for example, that when using this
200      function to perform Monte-Carlo simulations one cannot expect
201      results to be exactly reproducible.  The pseudo random number
202      generators of each process are initialised with a unique state.
203      This currently works only for new style generators.
204
205      NOTE: this function is implemented using "fork" and a number of
206      pipes for IPC.  Suitable for systems with an efficient "fork"
207      implementation (such as GNU/Linux), on other systems (Windows) it
208      should be used with caution.  Also, if you use a multithreaded
209      BLAS, it may be wise to turn off multi-threading when using this
210      function.
211
212      CAUTION: This function should be regarded as experimental.
213      Although all subprocesses should be cleared in theory, there is
214      always a danger of a subprocess hanging up, especially if
215      unhandled errors occur. Under GNU and compatible systems, the
216      following shell command may be used to display orphaned Octave
217      processes: ps -ppid 1 | grep octave
218
219
220
221
222
223 # name: <cell-element>
224 # type: sq_string
225 # elements: 1
226 # length: 73
227 Evaluates a function for multiple argument sets using multiple
228 processes.
229
230
231
232 # name: <cell-element>
233 # type: sq_string
234 # elements: 1
235 # length: 8
236 safeprod
237
238
239 # name: <cell-element>
240 # type: sq_string
241 # elements: 1
242 # length: 395
243  -- Function File: P = safeprod (X, DIM)
244  -- Function File: [P, E] = safeprod (X, DIM)
245      This function forms product(s) of elements of the array X along
246      the dimension specified by DIM, analogically to `prod', but avoids
247      overflows and underflows if possible. If called with 2 output
248      arguments, P and E are computed so that the product is `P * 2^E'.
249
250      See also: prod, log2
251
252
253
254
255
256 # name: <cell-element>
257 # type: sq_string
258 # elements: 1
259 # length: 80
260 This function forms product(s) of elements of the array X along the
261 dimension sp
262
263
264
265 # name: <cell-element>
266 # type: sq_string
267 # elements: 1
268 # length: 9
269 unresamp2
270
271
272 # name: <cell-element>
273 # type: sq_string
274 # elements: 1
275 # length: 341
276  -- Function File: [XS, YS] = unresamp2 (X, Y, N)
277      Perform a uniform resampling of a planar curve.  The arrays X and
278      Y specify x and y coordinates of the points of the curve.  On
279      return, the same curve is approximated by XS, YS that have length N
280      and the distances between successive points are approximately
281      equal.
282
283
284
285
286 # name: <cell-element>
287 # type: sq_string
288 # elements: 1
289 # length: 47
290 Perform a uniform resampling of a planar curve.
291
292
293
294 # name: <cell-element>
295 # type: sq_string
296 # elements: 1
297 # length: 6
298 unvech
299
300
301 # name: <cell-element>
302 # type: sq_string
303 # elements: 1
304 # length: 477
305  -- Function File: M = unvech (V, SCALE)
306      Performs the reverse of `vech' on the vector V.
307
308      Given a Nx1 array V describing the lower triangular part of a
309      matrix (as obtained from `vech'), it returns the full matrix.
310
311      The upper triangular part of the matrix will be multiplied by
312      SCALE such that 1 and -1 can be used for symmetric and
313      antisymmetric matrix respectively.  SCALE must be a scalar and
314      defaults to 1.
315
316      See also: vech, ind2sub
317
318
319
320
321
322 # name: <cell-element>
323 # type: sq_string
324 # elements: 1
325 # length: 47
326 Performs the reverse of `vech' on the vector V.
327
328
329
330 # name: <cell-element>
331 # type: sq_string
332 # elements: 1
333 # length: 6
334 ztvals
335
336
337 # name: <cell-element>
338 # type: sq_string
339 # elements: 1
340 # length: 291
341  -- Function File:  function ztvals (X, TOL)
342      Replaces tiny elements of the vector X by zeros.  Equivalent to
343             X(abs(X) < TOL * norm (X, Inf)) = 0
344      TOL specifies the chopping tolerance. It defaults to 1e-10 for
345      double precision and 1e-5 for single precision inputs.
346
347
348
349
350 # name: <cell-element>
351 # type: sq_string
352 # elements: 1
353 # length: 48
354 Replaces tiny elements of the vector X by zeros.
355
356
357
358
359