How to avoid the rounding error, when exporting data like this:
ra = Range[0.004, 0.074, 0.0005];
Export["range.txt", ra]
How to avoid the rounding error, when exporting data like this:
ra = Range[0.004, 0.074, 0.0005];
Export["range.txt", ra]
You may use SetPrecision on your list, ra.
ExportString[SetPrecision[ra, 6], "Table"]
0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008 0.0085 0.009 0.0095 0.01 0.0105 ...
Hope this helps.
ToString@NumberForm[#, {10, 4}] & /@ rabefore exporting. Does that help? – halirutan Jun 28 '18 at 12:02Export["range.txt", NumberForm[ra, {10, 4}], "List"]– Lukas Lang Jun 28 '18 at 12:39