Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
conditions for unique function

Subject: conditions for unique function

From: J G

Date: 18 Aug, 2010 03:35:19

Message: 1 of 3

Is is possible to set conditions for the unique function? For example, the number is unique if difference > 0.01 ?
Thanks.

Subject: conditions for unique function

From: Darren Rowland

Date: 18 Aug, 2010 03:50:05

Message: 2 of 3

This FEX submission by Siyi Deng might do what you're after

http://www.mathworks.com/matlabcentral/fileexchange/27498-unique-with-tolerance

Subject: conditions for unique function

From: Bruno Luong

Date: 18 Aug, 2010 10:34:06

Message: 3 of 3

"J G" <jemma.geoghegan@gmail.com> wrote in message <i4fkdn$lbv$1@fred.mathworks.com>...
> Is is possible to set conditions for the unique function? For example, the number is unique if difference > 0.01 ?

This question does not make sense mathematically. If you fix this criteria, then

0 and 0.005 are considered as single unique
0.005 0.01 are considered as single unique
0.01 and 0.015 are considered as single unique

Though 0 and 0.015 won't because the difference is > 0.01.

What is the correct answer?

Bruno

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us