I have a data file that must be in a specific order through a descending column. I want to check that the data in my cells is in the correct order.
my file should have the following order within the 4th column:
'BLCU'
'BLCD'
'BLCU'
'BLCD'
'BLCU'
'OGCU'
'OGSS'
'OGES'
'OGSA'
'OGLO'
'OGCD'
for x = 1:100
strcmp(trials{x:x+1,4},'BLCU' 'BLCD')
disp(trials{x,3})
end
My chunks have to be in the correct order and they have to follow one another, but obviously strcmp() cannot compare two cells at once. I would like to return the index (located in cell 3) where the error occurs if a chunk is incorrect. Finally, I also need to detect typos (ie. a OGES labeled as a OGED, etc).
Thanks in advance