~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/eng/mtlb/mtlb_cumprod.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<!-- When this file is modified please also modify mtlb_cumsum.xml -->
 
4
<MAN>
 
5
  <LANGUAGE>eng</LANGUAGE>
 
6
  <TITLE>mtlb_cumprod</TITLE>
 
7
  <TYPE>M2SCI function</TYPE>
 
8
  <DATE>Fev 2004</DATE>
 
9
 
 
10
  <SHORT_DESCRIPTION name="mtlb_cumprod">Matlab cumprod emulation function</SHORT_DESCRIPTION>
 
11
 
 
12
  <DESCRIPTION>
 
13
 
 
14
    <P>Matlab and Scilab <VERB>cumprod</VERB> behave differently in some particular cases:</P>
 
15
 
 
16
    <DESCRIPTION_INDENT>
 
17
    <DESCRIPTION_ITEM>
 
18
    <ITEMIZE>
 
19
      <ITEM>
 
20
        <SP>
 
21
        When used with one input (<VERB>cumprod(A)</VERB>), Matlab <VERB>cumprod</VERB>
 
22
        treats the values along the first non-singleton dimension of A as vectors while
 
23
        Scilab <VERB>cumprod</VERB> treats all A values.
 
24
        </SP>
 
25
       </ITEM>
 
26
 
 
27
       <ITEM>
 
28
        <SP>
 
29
        When used with two inputs (<VERB>cumprod(A,dim)</VERB>), Matlab tolerates <VERB>dim</VERB>
 
30
        to be greater than the number of dimensions of A while Scilab returns an error message in this case.
 
31
        </SP>
 
32
      </ITEM>
 
33
    </ITEMIZE>
 
34
    </DESCRIPTION_ITEM>
 
35
    </DESCRIPTION_INDENT>
 
36
 
 
37
    <P>    
 
38
    The function <VERB>R = mtlb_cumprod(A[,dim])</VERB> is used by
 
39
    <VERB>mfile2sci</VERB> to replace <VERB>cumprod(A[,dim])</VERB> when it was not
 
40
    possible to know what were the inputs while porting Matlab code to Scilab. This function will
 
41
    determine the correct semantic at run time. If you want to have a
 
42
    more efficient code it is possible to replace <VERB>mtlb_cumprod</VERB> calls:
 
43
    </P>
 
44
 
 
45
    <DESCRIPTION_INDENT>
 
46
    <DESCRIPTION_ITEM>
 
47
    <ITEMIZE>
 
48
      <ITEM>
 
49
        <SP>
 
50
        If <VERB>dim</VERB> is less equal to the number of dimensions of A
 
51
        <VERB>R = mtlb_cumprod(A,dim)</VERB> may be replaced by <VERB>R = cumprod(A,dim)</VERB>
 
52
        </SP>
 
53
      </ITEM>
 
54
 
 
55
      <ITEM>
 
56
        <SP>
 
57
        If <VERB>dim</VERB> is greater than then number of dimensions of A
 
58
        <VERB>R = mtlb_cumprod(A,dim)</VERB> may be replaced by <VERB>R = A</VERB>.
 
59
        </SP>
 
60
      </ITEM>
 
61
    </ITEMIZE>
 
62
    </DESCRIPTION_ITEM>
 
63
    </DESCRIPTION_INDENT>
 
64
 
 
65
    <P>Caution: <VERB>mtlb_cumprod</VERB> has not to be used for hand coded functions.</P>
 
66
 
 
67
  </DESCRIPTION>
 
68
 
 
69
  <SEE_ALSO>
 
70
    <SEE_ALSO_ITEM> <LINK>firstnonsingleton</LINK> </SEE_ALSO_ITEM>
 
71
  </SEE_ALSO>
 
72
 
 
73
  <AUTHORS>
 
74
    <AUTHORS_ITEM>V.C.</AUTHORS_ITEM>
 
75
  </AUTHORS>
 
76
</MAN>