Compare two different data tables and extract rows

조회 수: 4 (최근 30일)
BERK INAN
BERK INAN 2021년 1월 9일
댓글: BERK INAN 2021년 1월 10일
I have two Excel file and also two different counter due to duplicate number. For example, Counter1 is 1,2,3,4,5; Counter2 is 1,2,2,3,4,5. Therefore, i wanna extract duplicate rows. Then, i would like to plot datas like plot(counter1,A1); hold on; plot(counter2,A2). My aim is display difference between 2 datas of excel files like plot(counter1,A-A). My problem is causing due to Data1 is receiving from sensor A, Data2 is receiving from sensor B.
Question: How can i match two counters? Note: For loop is take too long. I have more than 2.000.000.000 datas.

채택된 답변

Cris LaPierre
Cris LaPierre 2021년 1월 9일
편집: Cris LaPierre 2021년 1월 9일
I would use the unique function with the following syntax.
However, if you really have 2 billion rows, plan on any approach taking a while.
  댓글 수: 1
BERK INAN
BERK INAN 2021년 1월 10일
I thanks a lot.
I solved this problem before you. I used unique function like you.
[C3,ia] = unique(Data1.counter1);
C4 = Data1(ia,:);

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by