Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

issparse

Return true if variable var is a sparse array.

Syntax

  • res = issparse(var)

Input argument

  • var - a variable

Output argument

  • res - a logical: true or false

Description

issparse returns a logical 1 if the argument is a sparse array and a logical 0 otherwise.

Examples

A = 1;
res = issparse(A)
B = sparse(1);
res = issparse(B)

See also

sparse.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET