format numbers in txt
Ältere Kommentare anzeigen
R2=R;
R2(R2==2) = 0.25;
R2(R2==1) = 0.15;
fid = fopen('porosity.txt','wt');
if fid > 0
fprintf(fid,'%d\n',R2');
fclose(fid);
end
When I write the array to a txt file, the format of the values change. From 0.15 to 1.500000e-01 How to keep the initial format 0.15 ?
Thank you.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Cell Arrays finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!