Could Please Explain Script Flow Chat Diagram Inputtxt Change Input File Name Outputtxt Ch Q37078086

could you please explain what the script below does witha flow chat diagram?

in=’input.txt’;%change the input file name
out=’output.txt’;%change the output file name
ofile=fopen(out,’r’);
file=fopen(in,’w’);
s=[];
counts=1;
while ~feof(file)
tline = fgetl(file);
if(strfind(tline,’m’))
if(counts~=)
fprintf(ofile,’ttt1 293.6tendn’);
end
tline=[tline ‘ ‘ num2str(counts) ‘ 2.713 4’];
fprintf(ofile,’%sn’,tline);
counts=counts+1;
else
a=sscanf(tline,’%d %e’);
fprintf(ofile,’ttt%dtt%En’,a(1),-a(2)*100);
end

end
fprintf(ofile,’ttt1 293.6tendn’);


Solution


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.