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

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ヘルプ >> 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 — 疎行列のエントリを取得
Report an issue
<< issparse Sparse Matrix Manipulation speye >>

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 Feb 14 15:10:30 CET 2017