필터 지우기
필터 지우기

find a row with a column value don't remove duplicated cells

조회 수: 1 (최근 30일)
Amr Hashem
Amr Hashem 2015년 5월 12일
댓글: Amr Hashem 2015년 5월 12일
i compare data in two sheets, if there are a dublicated row i want to save its last cell column in the previous row i use for i=1:size(alldata,1) for j=1:length(defs)
if data2{j,1}==alldata{i,1} % compare MDR in two files, if equal
data1(j,:)=alldata(i,:); % put all data of text in array(data1)
if data1{j-1,1} == data1{j,1} % here it gives me error
data1(j,C2+1)=alldata(i,6); % put dyplicated text in C7 works good
end
end
end
end
but it gives me error in
" if data1{j-1,1} == data1{j,1}"
how i can solve this ?

채택된 답변

Nobel Mondal
Nobel Mondal 2015년 5월 12일
편집: Nobel Mondal 2015년 5월 12일
for j=1, it is trying to access data1{0,1} but matlab indexing starts from 1.
  댓글 수: 1
Amr Hashem
Amr Hashem 2015년 5월 12일
how i can solve this?
i want to compare the new result with the previous one

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by