필터 지우기
필터 지우기

Setdiff n intersect question

조회 수: 2 (최근 30일)
Neesha
Neesha 2014년 8월 21일
댓글: Neesha 2014년 8월 22일
Hi,
I have two dataset.
1)
  • Shop# - floor#
  • 321 - 4
  • 321 - 2
  • 321 - 3
  • 322 - 0
  • 322 - 2
2)
  • shop# - floor#
  • 322 - 1
  • 322 - 0
  • 322 - 2
if i do intersect of those two, i expect following, but i get just first row. WHy? 3)
  • shop# - floor#
  • 322 - 0
  • 322 - 2

채택된 답변

Guillaume
Guillaume 2014년 8월 21일
>> a=[321 4;321 2;321 3;322 0;322 2];
>> b=[322 1;322 0;322 2];
>> intersect(a, b, 'rows')
ans =
322 0
322 2
  댓글 수: 8
Matt J
Matt J 2014년 8월 22일
@Neesha, if you got it work, you should accept Guillaume's answer
Neesha
Neesha 2014년 8월 22일
i accepted it, but i did not end up using 'rows', it worked without it as problem was coming from somewhere else

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

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by