File: prod.man

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (39 lines) | stat: -rw-r--r-- 943 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.TH prod G "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
prod - product
.SH CALLING SEQUENCE
.nf
y=prod(x)
y=prod(x,'r') or y=prod(x,1)
y=prod(x,'c') or y=prod(x,2)
.fi
.SH PARAMETERS
.TP
x 
: real or complex vector or matrix
.TP
y
: real or complex scalar or matrix
.SH DESCRIPTION
For a vector or a matrix \fVx\fR, \fVy=prod(x)\fR  returns in the scalar \fVy\fR the prod of all the entries
of \fVx\fR, , e.g. \fVprod(1:n)\fR is n!
.LP
\fVy=prod(x,'r')\fR (or, equivalently, \fVy=prod(x,1)\fR)computes the
rows elementwise product of  \fVx\fR. \fVy\fR is the row vector: \fVy(i)=prod(x(i,:))\fR. 
.LP
\fVy=prod(x,'c')\fR (or, equivalently, \fVy=prod(x,2)\fR) computes the
columns elementwise product of  \fVx\fR. \fVy\fR is the column vector: \fVy(i)=prod(x(:,i))\fR. 
.LP
\fVprod\fR is not implemented for sparse matrices.
.SH EXAMPLE
.nf
A=[1,2;0,100];
prod(A)
prod(A,'c')
prod(A,'r')
.fi
.SH SEE ALSO
sum, cumprod