MATLAB: Writing a cat file

image processing

i have a values
A=[m V SD],where m is mean, v is variance ,sd is standard dev of an image
now i want to write A into folder ,my folder name is new1
i have 100 images ,and have found m,v,sd for all images
so in that folder i need to store all values i.e(A1 to A100) please help

Best Answer

Hello, Pat
I just give you small example.
Then, I hope you can use it or do modification on it for your purpose.
clear; clc;
for cnt = 1 : 10
m = 255*rand;
V = 255*rand;
SD = 255*rand;
filename = strcat(pwd,'\New1\A',num2str(cnt),'.txt');
fid = fopen(filename, 'w');
fprintf(fid,'mean : %.2f\n variance : %.2f\n standard dev : %.2f\n',m,V,SD);
fclose(fid);
end