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

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

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

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

cumprod

配列要素の累積積

呼び出し手順

y=cumprod(x)
y=cumprod(x,orientation)
y=cumprod(x,outtype)
y=cumprod(x,orientation,outtype)

引数

x

実数, 複素数, 論理値, 多項式または有理数の 配列

orientation

以下のどちらかを指定します

  • 文字列で,指定可能な値は "*", "r", "c" または "m"

  • 正の整数値

outtype

文字列で,指定可能な値は "native" または "double".

y

スカラーまたは配列

説明

配列xの場合, y=cumprod(x)xの全要素の累積積を スカラーyに返します.

y=cumprod(x,orientation) は, orientationで指定した次元方向の xの累積積を yに返します.

  • orientation が 1 または "r" の場合:

    または

  • orientation が 2 または "c" の場合:

    または

  • orientation がnの場合:

  • y=cumprod(x,"*")y=cumprod(x) と等価です.

  • y=cumprod(x,"m")y=cumprod(x,orientation) と等価です. ただし,orientation は, xの1より大きい最初の次元の添字です. このオプションはMatlabとの互換性のために使用されます.

outtype引数は積算の動作を指定します:

  • float, 多項式, 有理数の配列の場合, 評価は常に浮動小数点計算で行われます. "double" または "native" オプションは等価です.

  • 整数の配列の場合,

    outtype="native" の場合, 評価は整数比較(モジュロ 2^b, ただし b は使用されるビット数) により行われます,

    outtype="double" の場合, 評価は浮動小数点計算で行われます.

    デフォルト値は outtype="native"です.

  • 論理値の配列の場合,

    outtype="native"の場合, 評価は論理値計算(* は &で置換)により行われます,

    outtype="double"の場合, 評価は浮動小数点計算で行われます (%t は値1, %f は値0で置換されます).

    デフォルト値はouttype="double"です.

注意

この関数には, 疎行列 および ハイパー行列と 同じ規則が適用されます.

A=[1,2;3,4];
cumprod(A)
cumprod(A,1)

I=uint8([2 95 103;254 9 0])
cumprod(I) //native evaluation
cumprod(I,"double")
cumprod(I,2,"double")

s=poly(0,"s");
P=[s,%i+s;s^2,1];
cumprod(P),
cumprod(P,2)

B=[%t %t %f %f];
cumprod(B) //evaluation in float
cumprod(B,"native") //similar to and(B)

参照

  • prod — 配列要素の積
  • cumsum — 配列要素の累積和
Report an issue
<< cross matrixoperations cumsum >>

Copyright (c) 2022-2023 (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:
Thu Oct 02 13:58:21 CEST 2014