- Firstly, set the format to ‘long’, you can do these by executing command ‘format long’.
- And then read the value from excel file using ‘readtable’ function.
xlsread problem regarding reading values
11 次查看（过去 30 天）
While i read a excel sheet using xlsread, it doesn't show whole value in the variable file but when i print the value i shows more decimal places than the actual value.
For eg. the actual number in excel sheet is 3.53719759
the value shown in variable when i open it 3.5372
the value shown when i print it is 3.53719758987427
How can i get the exact same value as it is in the excel sheet?
The values are getting rounded off because by default MATLAB uses ‘short’ format and hence displays numbers only up to 4 decimal places.
In order to get the correct values, follow these steps:
Please refer the following documentation for further details: