Get index of rows containing text in a column
2 views (last 30 days)
Show older comments
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'.
0 Comments
Accepted Answer
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)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!