Please note that the recommended version of Scilab is 2026.0.0. This page might be outdated.
See the recommended documentation of this function
prod
配列要素の積
呼び出し手順
y=prod(x) y=prod(x,orientation) y=prod(x,outtype) y=prod(x,orientation,outtype)
引数
- x
- 実数, 複素数, 論理値, 多項式または有理数の配列 
- orientation
- 以下のどちらかを指定します - 文字列で,使用可能な値は - "*",- "r",- "c"または- "m"
- 正の整数値 
 
- outtype
- 文字列で, 使用可能な値は - "native"または- "double".
- y
- スカラーまたは配列 
説明
配列xに関して,
            y=prod(x)はスカラー yに
            xの全要素の積を返します.
y=prod(x,orientation) は
            orientationで指定された方向の
            xの積をyに返します:
- orientationが1または "r"の場合: - または  
- orientationが 2 または "c" の場合: - または  
- orientationが n の場合: 
- y=prod(x,"*")は- y=prod(x)と等価です.
- y=prod(x,"m")は- y=prod(x,orientation)と等価です. ただし,- orientationは- xの1より大きい最初の次元の添字です.
outtype引数は積算の動作を規定します:
- float, 多項式, 有理数の配列の場合, 評価は常に浮動小数点演算により行われます. - "double"と- "native"オプションは等価です.
- 整数の配列の場合, - outtype="native"の時, 評価は整数演算(モジュロ 2^b, ただし b は使用されるビット数) により行われます.- outtype="double"の時, 評価は浮動小数点演算により行われます.- デフォルト値は - outtype="native"です.
- 論理値の配列の場合, - outtype="native"の時, 評価は論理値演算(* は &で置換されます)で行われます.- outtype="double"の時, 評価は浮動小数点演算(%t は1, %f は 0 で置換されます) により行われます.- デフォルト値は, - outtype="double"です. このオプションは Matlabとの互換性のために使用されます.
|  | This function applies with identical rules to sparse matrices. | 
例
| Report an issue | ||
| << or | matrixoperations | sign >> |