Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - Português

Change language to:
English - Français - 日本語 - Русский

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

Ajuda Scilab >> Matrizes Esparsas > Sparse Matrix Manipulation > nnz

nnz

número de entradas não-nulas de uma matriz

Seqüência de Chamamento

n=nnz(X)

Parâmetros

X

matriz de reais ou complexos esparsa (ou cheia)

n

inteiro, número de elementos não-nulos de X.

Descrição

nnz conta o número de entradas não-nulas de uma matriz esparsa ou cheia.

Exemplos

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

Ver Também

Report an issue
<< Sparse Matrix Manipulation Sparse Matrix Manipulation speye >>

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:
Mon Oct 01 17:39:49 CEST 2012