%% Number of Nonzeros
% Create an identity matrix and determine the number of nonzeros it contains.

X = eye(4)

%

N = nnz(X)

%
% Copyright 2018 The MathWorks, Inc.