I have 50 images, I want to write data into text file in matlab for each image column wise but when I run the programe it will write data only one image value.
srcFiles = dir('E:\practice \\*.jpg');
for i = 1 : length(srcFiles)
filename = strcat('E:\practice\',srcFiles(i).name);
I = imread(filename);
B=bwlabel(I);
D=regionprops(B,'MajorAxisLength','MinorAxisLength','Extent');
j=D.MajorAxisLength;
k=D.MinorAxisLength;
Axialratio=j/k
ex=[D.Extent]
fid=fopen('mu.txt ','wt+');
fprintf(fid,'extent Axialratio\n');
fprintf(fid,'%6f %6f \n',[ex,Axialratio]);
fclose(fid);
end