How can i delete the rows that have the same value in data file
Show older comments
I have big file of binary data (0,1) and I need to delete all rows that have the same value. For Example, if the second and the third row for all columns is zero, I want to delete theses two rows.
0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 0 1 1 0 1
Answers (1)
Andrei Bobrov
on 20 Mar 2018
out = a(any(diff(a,1,2)~=0,2),:);
Categories
Find more on Standard File Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!