I have this text file created from
I = imread('3.jpg');i = im2bw(I);m = max(max(i));[r c] = find(i == m);fid = fopen('lalit.txt','wt');for j=1:length(r)fprintf(fid,'%f %f\n',r(j),c(j));endfclose(fid); Now i want to do for m = 1:length(r)z(m) = round((r(m) + c(m))/2);endz=z';
Now i want to save this z as third column in the same text file, but without modifying r and c.
Best Answer