How to extract the set of values in matlab?

1 回表示 (過去 30 日間)
Gowrishankar R
Gowrishankar R 2016 年 2 月 19 日
回答済み: Walter Roberson 2016 年 2 月 19 日
I have some set of values like
(line1) 0.1,0.69,0.81
(line2) 0.4,0.5,0.8
like this(about thousand line)
among these from line5 to line8 i have some set of values and they are repeated somewhere (not exactly same but almost same) like line32 to line35.. so how do i extract these set of values using Matlab?
  3 件のコメント
Sergio Zlotnik
Sergio Zlotnik 2016 年 2 月 19 日
Maybe this helps:
roundedTable = round(yourTable, nOfDigitsToRound);
noRepeatedRows = unique(roundedTable, 'rows');
Gowrishankar R
Gowrishankar R 2016 年 2 月 19 日
that means for ex
  • 2.51,3.22,4.15 line1
  • 3.33,4.34,5.16 line2
then
  • 2.49,3.21,4.14 line35
  • 3.34,4.35,5.15 line36
the values are almost same.. not perfectly same.. that's what i wanted to say..

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 2 月 19 日
If you have R2015a or later, consider using http://www.mathworks.com/help/matlab/ref/ismembertol.html with 'ByRow' set.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by