Answer the question
In order to leave comments, you need to log in
Matlab - how to fix loss of digits in double?
Matlab, there are arrays x and y of double type, x contains values around 750000, y contains values around 600 with decimal places, when combining their variables [x(1) y(1)] matlab gives a result like 7.5000 0.0006, in this case, y loses a certain number of significant digits.
How can this be fixed?
Answer the question
In order to leave comments, you need to log in
In fact, no digits are lost, just by default, 4 digits after the decimal point are printed on the screen. The variable itself stores numbers with the same precision with which they were written there. If you want to display more digits after the decimal point on the screen, then use the command format long
www.mathworks.com/help/matlab/ref/format.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question