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

1 次查看(过去 30 天)
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
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