フィルターのクリア

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 Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by