findduplicate(X)
Version 1.0.0.0 (456 Bytes) by
Liutong
find duplicate rows in a table, timetable or array.
ind=findduplicate(X) returns a linear index ind for duplicate records in X.
findduplicate treat each row in X as a record.
input:
-X: vector, array, table or timetable.
output:
-ind: linear index for duplicated records in X
tip: to find duplicate values in a matrix, use findduplicate(X(:))
Example:
findduplicate(string(
{'John','Waston';...
'Anna','Blei';...
'John','Waston'}
))
returns 3
Cite As
Liutong (2026). findduplicate(X) (https://www.mathworks.com/matlabcentral/fileexchange/62539-findduplicate-x), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2016b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Language Fundamentals > Data Types > Tables >
Find more on Tables in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
