Get index of rows containing text in a column

2 views (last 30 days)
Hi,
Please see the attached table.
How can I determine the ROW NUMBERS for all rows containing a "X" in the column C.
I tried using the following...
exampleTable(:,3)=='X'
However, I received the following error: Undefined function 'eq' for input arguments of type 'cell'.

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 4 Apr 2014
Edited: Azzi Abdelmalek on 4 Apr 2014
[a,b,v]=xlsread('exampleTable_Matlab.xlsx')
c3=v(:,3)
idx=strcmp(c3,'x')
To ignore case, use strcmpi

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!