%% Find Strings That Are Not Empty
% Find strings that do have characters and display only those strings.

str = string({'Amy','Charles','';...
              'Mark','','Sarah'})

%
% Use the ~ operator to invert tf, so that tf contains 1 wherever str contains a string with more than zero characters.

tf = str=='';
tf = ~tf

%
% Display only the strings that are not empty.

str(tf)

% Copyright 2012 The MathWorks, Inc.