Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.1 - 日本語

Change language to:
English - Français - Português - Русский

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

Scilab help >> 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 — 積
Report an issue
<< abs matrixoperations cumsum >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Tue Apr 02 17:37:31 CEST 2013