Home > atmlab > handy > none.m

none

PURPOSE ^

NONE True if all elements are zero.

SYNOPSIS ^

function B = none(X, dim)

DESCRIPTION ^

 NONE True if all elements are zero.

 implemented as all(~X, dim)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

none.m

SOURCE CODE ^

0001 function B = none(X, dim)
0002 
0003 % NONE True if all elements are zero.
0004 %
0005 % implemented as all(~X, dim)
0006 
0007 % $Id$
0008 
0009 if ~exist('dim', 'var')
0010     dim = [];
0011 end
0012 
0013 narginchk(1, 2);
0014 
0015 switch nargin
0016     case 1
0017         B = all(~X);
0018     case 2
0019         B = all(~X, dim);
0020 end
0021 
0022 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005