MATLAB: Remove character within a string

MATLAB

code error for removing loc(character) from birds(string). loc ensure has three letters.
function [nm, couriers] = ostrichExpress(birds, loc)
ind=strfind(birds,loc);
nm=length(ind);
birds(ind:ind+2)=[]; %error
couriers=birds;
end

Best Answer

s1 = 'DJI GHA MOZ DJI NER NER NER GHA ' ;
s2 = 'NER' ;
s1 = strsplit(s1) ;
idx = ismember(s1,s2) ; % get the strings present
s1(idx) = [] ; % remove the strings
s1 = strjoin(s1)