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

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 help >> Sparses Matrix > 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 — 疎行列のエントリを取得
<< mtlb_sparse Sparses Matrix pcg >>

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:
Wed Oct 05 12:12:53 CEST 2011