필터 지우기
필터 지우기

How can I read an excel file without approximating values to 4 decimal places?

조회 수: 3 (최근 30일)
I read an excel file as part of my code but the particular values I am interested are approximated to 4 decimal places instead of the higher places I would want to have. These are latitude and longitude values and every digit is important. Is there a way I can read all decimal places with any approximation?
This is in R2018b.

채택된 답변

Stephen23
Stephen23 2018년 11월 9일
편집: Stephen23 2018년 11월 9일
MATLAB does not "approximating values to 4 decimal places" when reading file data, that is simply how the values are being displayed. Do not confuse how values are displayed with what values are actually stored in MATLAB memory: these are two quite different things! You can change how values are displayed by using the format function, e.g. run this in the command window:
format longg
then display your data again. Try other format options and pick one that you like.
If you are using the Variable Viewer then change its format options.
  댓글 수: 2
MUKHTAR MISBAHU UMAR
MUKHTAR MISBAHU UMAR 2018년 11월 9일
Thank you. does that go before reading the file?
MUKHTAR MISBAHU UMAR
MUKHTAR MISBAHU UMAR 2018년 11월 9일
Thank you. I completely forgot the values are displayed based on the format. Much appreciated.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by