D
D
Daniil Martynchuk2014-05-07 19:14:56
MATLAB
Daniil Martynchuk, 2014-05-07 19:14:56

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

1 answer(s)
M
maksimov_aleks, 2014-05-08
@maksimov_aleks

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 question

Ask a Question

731 491 924 answers to any question