Return Unique Element with a Tolerance

后端 未结 7 1333
无人共我
无人共我 2020-11-27 06:40

In Matlab, there is this unique command that returns thew unique rows in an array. This is a very handy command.

But the problem is that I can\'t assign tolerance to

7条回答
  •  粉色の甜心
    2020-11-27 06:46

    I was stuck the other day with a MatLab 2010, so, no round(X,n), no _mergesimpts (At least I couldn't get it to work) so, a simple solution that works (at least for my data):

    Using rat default tolerance:

    unique(cellstr(rat(x)))
    

    Other tolerance:

    unique(cellstr(rat(x,tol)))
    

提交回复
热议问题