How to get the indices of specified name

1 view (last 30 days)
Hi,
I have below cell array
Mek989.0
YTG873.0
RFD645.0
RFD645.0
WER134.0
WER134.0
my specified name:RFD645.0, and I want to find the indices of rows which is not "RFD645.0" here in this case, row1,2,5,6. My desired output is:
1
2
5
6

Accepted Answer

the cyclist
the cyclist on 15 Apr 2017
C = {'Mek989.0';
'YTG873.0';
'RFD645.0';
'RFD645.0';
'WER134.0';
'WER134.0'};
output = find(not(ismember(C,'RFD645.0')));
  7 Comments
Kanakaiah Jakkula
Kanakaiah Jakkula on 16 Apr 2017
Yes, It works, perfect. Thanks a lot.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!