How to remove duplicate rows from .mat file or text file with out sorting?
Show older comments
Hello all, I have 64954930*3 matrix. There are duplicate rows are exist. How can i delete with out sorting of original matrix.
This is my code
load('myfile.mat');
%A = unique(myfile(:,:),'rows');
A = myfile(:,:);
% B = unique(A,'stable');
% save('B.mat','B');
%C = setxor(A,'rows','stable');
should i write forloop? i used different formats. but getting various errors. such as sort input arguments of struct; Undefined myfile. Kindly help me. Thanks in advance.
7 Comments
Paolo
on 1 Jul 2018
Why is your code commented out? And why are you overwriting variable A in the third line? Can you attach a sample of your .mat file?
Ram
on 1 Jul 2018
jonas
on 1 Jul 2018
uniquetol has no stable option
Ram
on 1 Jul 2018
jonas
on 1 Jul 2018
Nothing is going to work for you if you get the message:
Undefined function or variable 'A'.
becuause it means there is no variable called A...
Accepted Answer
More Answers (0)
Categories
Find more on Structures 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!