MATLAB: How to find the position in a string array postion attributes={'aaaa','bbbb','cccc','dddd' };str='cccc'; how to find position 3 ? Best Answer Read the documentation in ismember() Related SolutionsMATLAB: Regexprep() skip first occurrence How about using regexp to find the position of spaces, and delete 2nd~Nth spaces? Like:mystring = 'this is my string';pos = regexp(mystring,'\s');mystring(pos(2:end)) = []; MATLAB: How to find two continuous words appear in the sentence Use strfind .For example, like this:find(~cellfun('isempty',strfind(A,'is good'))) Related QuestionReplacing String Values By PositionFinding position of a string in a cell arrayString compare
Best Answer