If this is pure mapping, you can also try sprintf () with formatted output. The syntax for what you want will be sprintf('%.4f',26.548746540516);
. You can see where you will need to change the number to a variable, and you can easily change the number of numbers after the decimal number (before using, for example,% 2.4f).
source share