Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - Русский

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

Scilab help >> Sparses Matrix > Sparse Matrix Manipulation > nnz

nnz

行列における非ゼロ要素の数

呼び出し手順

n=nnz(X)

パラメータ

X

実数または複素疎(または通常)行列

n

整数, Xの非ゼロ要素の数

説明

nnz は疎行列または通常の行列における 非ゼロ要素の数を数えます.

sp=sparse([1,2;4,5;3,10],[1,2,3]);
nnz(sp)
a=[1 0 0 0 2];
nnz(a)

参照

  • spget — 疎行列のエントリを取得
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:40:32 CEST 2012