Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Scilab 5.5.0
Change language to: English - Français - Português - Русский

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Elementary Functions > matrixoperations > cumprod

cumprod

呼び出し手順

```y=cumprod(x)
y=cumprod(x,'r') or y=cumprod(x,1)
y=cumprod(x,'c') or y=cumprod(x,2)
y=cumprod(x,'m')```

パラメータ

x

ベクトルまたは行列 (実数または複素数)

y

ベクトルまたは行列 (実数または複素数)

説明

`y=cumprod(x)`は, `x`がベクトルまたは行列の場合, `x`の全てのエントリの列方向の 累積積を`y`に返します.

`y=cumprod(x,'c')` (または, 等価的に, `y=cumprod(x,2)`) は `x`の列の 要素毎の累積積を`y`に返します: `y(i,:)=cumprod(x(i,:))`

`y=cumprod(x,'r')` (または, 等価的に, `y=cumprod(x,2)`) は `x`の行の 要素毎の累積積を`y`に返します: `y(:,i)=cumprod(x(:,i))`.

`y=cumprod(x,'m')``x`の最初の1より大きい次元方向の 累積積となります(Matlabとの互換性用).

例

```A=[1,2;3,4];

cumprod(A)
cumprod(A,'r')
cumprod(A,'c')

rand('seed',0);
a=rand(3,4);
[m,n]=size(a);
w=zeros(a);
w(1,:)=a(1,:);
for k=2:m;
w(k,:)=w(k-1,:).*a(k,:);
end;
w-cumprod(a,'r')```

参照

• cumsum — 累積和
• sum — ベクトル/行列エントリの合計 (行合計, 列合計)
• prod — 積

Comments

Add a comment:
Please login to comment this page.

 Report an issue << cross matrixoperations cumsum >>

 Scilab EnterprisesCopyright (c) 2011-2017 (Scilab Enterprises)Copyright (c) 1989-2012 (INRIA)Copyright (c) 1989-2007 (ENPC)with contributors Last updated:Fri Apr 11 14:18:54 CEST 2014