Hello, this is my problem: Background: I am comparing 2 files that should match in the first column but one of the files skips some numbers, suppose (12,12), (13,13), (14,15)*, so until now I have use a code to find and display the mismatches on the screen and I manually delete the excess rows in the complete file and rerun the code until everything matchs. Problem: Now usually I have used this with small files not correcting more than 10 mismatches, the problem is that I have a big data set with over 1000 of mismatches, so I need a way to delete the complete row of the "leftovers" in the txt file. Next is shown my coding:
%r is the number of total rows
%the first part is made for fileA and fileB storing in E and G matrices
fid = fopen('fileA.txt');num_ints = 23;num_rows = r;format = [repmat('%f ', 1, num_ints)];G = textscan(fid, format, num_rows);G = [G{1:num_ints}];fclose(fid);for a = 1:1:r if (E(a,1)~=G(a,1)); disp(E(a,1)); break endenddisp ('End of search');
As always thank you for your help!
Best Answer