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
MATLAB
function [nm, couriers] = ostrichExpress(birds, loc)ind=strfind(birds,loc);nm=length(ind);birds(ind:ind+2)=[]; %error
couriers=birds;end
Best Answer