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

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 manual >> Elementary Functions > 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')

参照

<< char Elementary Functions 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:
Wed Jan 26 16:25:03 CET 2011