MATLAB: How to find the position of a specific characters containing in a string in a cell array

cell arraysdata analysisstrings

hello. i have a 136×39 cell array like this one
'Data Name' 'Timestamp' 360 370
'001-Day 1-RE-1' '24/07/2014 10:17:10' -738.803345332164 -734.184486898226
'001-Day 1-RW-1' '24/07/2014 10:17:37' -707.272295650121 -703.634423319119
'001-Day 1-LE-1' '24/07/2014 10:19:20' -744.635983922777 -740.346463517543
'001-Day 1-LW-1' '24/07/2014 10:19:39' -751.552763303339 -747.041101104821
and I want to find the positions of 'RE','RW','LE','LW'. I tried with the function [RW1, RW2]=find(strcmp('RW', array)); but got no results. I also tried [RW1, RW2]=find(strcmp('*RW*', Acdelta)); or strfind..
Any ideas?
Many thanks

Best Answer

Use either strfind four times, once for each pattern (RE, RW, LE, LW). Note that strfind (and strcmp) does not accept wildcards, or regexp
pos = regexp(array(:, 1), 'RE|RW|LE|LW', 'once');
Note that you can't pass the full cell array to strfind or regexp, since it contains elements that are not strings. Here, I just pass the first column.
Also, in your example, the position is always the same, so why do you want to find it?