I have a csv-file with data I want to import into Matlab. Since it is a mix of date and numbers I use:
data = textscan (fid,\'%s%s%n%n%n%n%n\',819500,\'headerlin
Matlab often truncates the display of numbers to four decimal places, which is what may be happening. To check this, try forcing the formatting to five decimal places using fprintf
:
>>> myNum = 1.24028;
>>> fprintf("%.5f", myNum)
1.24028
Or by changing the formatting:
>>> myNum = 1.24028;
>>> format long
>>> myNum
myNum =
1.2402800000