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

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ヘルプ >> Statistics > Data with Missing Values > nansum

nansum

値の合計,NaNを無視

呼び出し手順

s = nansum(x,orient)

パラメータ

x

数値ベクトルまたは行列.

orient

なしまたは '*'. 'r' または 1. 'c' または 2.

s

追加処理の値を含む数値スカラーまたはベクトル .

説明

この関数は,数値ベクトルまたは行列xの (NaNを無視した)値の合計をsに返します.

あるベクトルまたは行列xについて, s=nansum(x) (または s=nansum(x,'*')) は (NaNを無視した)ベクトルまたは行列xの全エントリ の合計をスカラーsに返します.

s=nansum(x,'r')(もしくは等価な s=nansum(x,1)) は, 1xsize(x,'c')の行ベクトルsの各エントリに xの各列の(NaNを無視した)合計を返します.

s=nansum(x,'c')(もしくは等価な s=nansum(x,2)) は, size(x,'c')x1の列ベクトルsの各エントリに xの各行の(NaNを無視した)合計を返します.

最後の2つのケースで, ある行または列が全てNaNから構成される場合, sの対応する位置はNaNとなります.

x=[0.2113249 %nan 0.6653811;0.7560439 0.3303271 0.6283918]
m=nansum(x)
m=nansum(x,1)
m=nansum(x,2)

参照

  • nancumsum — 行列の値の累積合計
  • sum — ベクトル/行列エントリの合計 (行合計, 列合計)

参考文献

Wonacott, T.H. and Wonacott, R.J.; Introductory Statistics, 5th edition, J.Wiley and Sons, 1990.

Report an issue
<< nanstdev Data with Missing Values thrownan >>

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:
Fri Apr 11 14:18:57 CEST 2014