How to get the indices of specified name

1 次查看(过去 30 天)
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

采纳的回答

the cyclist
the cyclist 2017-4-15
C = {'Mek989.0';
'YTG873.0';
'RFD645.0';
'RFD645.0';
'WER134.0';
'WER134.0'};
output = find(not(ismember(C,'RFD645.0')));
  7 个评论
the cyclist
the cyclist 2017-4-15
You mean you want to find the first element that does not match?
indx=find(not(strcmpi(C,'RFD645.0')),1,'first')

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by