Home > data-utility > remove_empty_cells.m

remove_empty_cells

PURPOSE ^

no_empty removes any elements of a cell array that are empty.

SYNOPSIS ^

function full = no_empty(cell_array)

DESCRIPTION ^

 no_empty removes any elements of a cell array that are empty.

 The output is an Nx1 cell matrix, no matter what dimensions the input
 matrix are.  Sorry.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function full = no_empty(cell_array)
0002 % no_empty removes any elements of a cell array that are empty.
0003 %
0004 % The output is an Nx1 cell matrix, no matter what dimensions the input
0005 % matrix are.  Sorry.
0006 
0007 empty = cellfun(@isempty, cell_array);
0008 
0009 full = { cell_array{~ empty} }';
0010

Generated on Tue 23-May-2017 20:00:55 by m2html © 2005