%% Match Multiple Strings
% Create a string array.

str = ["Mercury","Venus","Earth","Mars"]

%
% Find elements of str that match either "Venus" or "Earth".

TF = matches(str,["Venus","Earth"])

%
% Display the matches by indexing into str using TF.

str(TF)

% Copyright 2019 The MathWorks, Inc.