필터 지우기
필터 지우기

How to remove rows from a table based on row value?

조회 수: 1 (최근 30일)
Tanu Shree
Tanu Shree 2020년 6월 21일
댓글: Tanu Shree 2020년 6월 22일
I am new to matlab.
I have below two tables t4 and t5. I want to remove rows from t5 where Id column matches from t4.
t4
t4 =
8×6 table
Id IC_01 IC_07 IC_05 IC_16 IC_26
_____ ___________ __________ _________ ___________ __________
10001 0.2 0.014466 0.0041359 0.00065841 -0.0027416
10002 0.0090867 0.0092911 0.0070487 -0.0020759 -0.0022272
10003 0.5 0.014684 0.010444 -0.0052934 -0.0029127
10004 0.0046753 0.00095655 0.0061542 -0.00042915 -0.0012221
10005 -0.00039777 0.0068783 0.0090508 0.00036861 0.00033614
10006 0.0003344 0.0053108 0.010053 0.0069197 -6.46e-05
10007 0.0051918 0.010585 0.01216 -0.00091951 -0.002255
10008 0.0077448 0.0097479 0.0093559 -0.0042185 -0.0038524
>> t5
t5 =
11×6 table
Id IC_01 IC_07 IC_05 IC_16 IC_26
_____ _________ __________ _________ ___________ __________
10001 0.0060698 0.014466 0.0041359 0.00065841 -0.0027416
10002 0.0090867 0.0092911 0.0070487 -0.0020759 -0.0022272
10003 0.008151 0.014684 0.010444 -0.0052934 -0.0029127
10004 0.0046753 0.00095655 0.0061542 -0.00042915 -0.0012221
10005 -0.10004 0.0068783 0.0090508 0.00036861 0.00033614
10006 0.0003344 0.0053108 0.010053 0.0069197 -6.46e-05
10007 0.0051918 0.010585 0.01216 -0.00091951 -0.002255
10008 0.0077448 0.0097479 0.0093559 -0.0042185 -0.0038524
10016 0.0003344 0.0053108 0.010053 0.0069197 -6.46e-05
10017 0.0051918 0.010585 0.01216 -0.00091951 -0.002255
10018 0.0077448 0.0097479 0.0093559 -0.0042185 -0.0038524

채택된 답변

madhan ravi
madhan ravi 2020년 6월 21일
t5(ismember(t4{:,1},t5{:,1}), :) = []
  댓글 수: 2
Tanu Shree
Tanu Shree 2020년 6월 22일
Thank you! It worked.
Tanu Shree
Tanu Shree 2020년 6월 22일
If I have to do the manupulation like join two table t4 and t5 and want to replace values in t4 from t5? Is that possible to acheive ?

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by