Table Of Contents

numnz

Version:
    Last Modified: January 9, 2017

    Returns the number of non-zero elements in a matrix.

    Syntax

    c = numnz(a)
    Legacy name: nnz

    Inputs

    a

    Array of any dimension.

    Outputs

    c

    Number of non-zero elements in a. c is an integer.

    A = [1, 2, 3; 0, 0, 0; 0, 2, 3];
    C = numnz(A)

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported


    Recently Viewed Topics