find matched data (place of equal values) ?
이전 댓글 표시
how i can find matched cells in two columns with accept multi matches for any cell.
the data is:

i use this code:
for j=1:length(defs)
querymdr=data2(:,1); # quermdr 5*1 cells
y=alldata(:,1); % y 37*1 cells
ind=find(y==querymdr) ;
record= alldata(idx,:);
% record=[alldata{idx(1),:}];
for k=2:length(idx)
record = [record,(alldata(idx(k),6))];
end
data1(j,:)=record;% put combined record into result table
end
it gives me an error in
ind= find(y==querymdr) ;
with a message "Undefined function 'eq' for input arguments of type 'cell'. " what i can do ?
any help please...!
채택된 답변
추가 답변 (1개)
Walter Roberson
2015년 5월 15일
1 개 추천
What you do is you stop posting the same material and you use the solution I already gave in your previous topic
댓글 수: 8
Amr Hashem
2015년 5월 15일
Joseph Cheng
2015년 5월 15일
what is the error,
Amr Hashem
2015년 5월 15일
Amr Hashem
2015년 5월 15일
Walter Roberson
2015년 5월 15일
Looks like perhaps you should use
querymdr = [data2{:}];
I asked you for the class() information quite a number of hours ago :(
Amr Hashem
2015년 5월 15일
Walter Roberson
2015년 5월 15일
When working with a cell array, one has to know the class() and size() of the entries in the array as well.
Amr Hashem
2015년 5월 16일
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
