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 > cumsum

cumsum

累積和

呼び出し手順

y=cumsum(x)
y=cumsum(x,'r') or y=cumsum(x,1)
y=cumsum(x,'c') or y=cumsum(x,2)

パラメータ

x

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

y

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

説明

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

y=cumsum(x,'c') (または, 等価的に, y=cumsum(x,2)) は xの列の累積和をyに 返します: y(i,:)=cumsum(x(i,:))

y=cumsum(x,'r') (または, 等価的に, y=cumsum(x,1)) は xの行の累積和をyに 返します: y(:,i)=cumsum(x(:,i))

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

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

cumsum(A)
cumsum(A,'r')
cumsum(A,'c')

a=rand(3,4)+%i;
[m,n]=size(a);
w=zeros(a);
w(1,:)=a(1,:);
for k=2:m;
  w(k,:)=w(k-1,:)+a(k,:);
end;
w-cumsum(a,'r')

参照

  • cumprod — 累積積
  • sum — ベクトル/行列エントリの合計 (行合計, 列合計)
Report an issue
<< cumprod matrixoperations kron >>

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