Here is a MATLAB function that takes a list of numbers and detects if any two numbers in the list are identical:
main.m523 chars18 lines
To test this function, you can call it with different input lists:
main.m143 chars4 lines
This should output out1 = 1
and out2 = 0
, as expected.
gistlibby LogSnag