The original data of textfile is 95000.823, use "dlmread" command to read into matlab. But, the data change to "95001". Double click it on the variable matrix window, the data is still "95001", and copy it out and paste to the notepad, "95001" still.
how remain the original data accuracy?
thank u very much!!

답변 (1개)

per isakson
per isakson 2013년 11월 9일
편집: per isakson 2013년 11월 9일

0 개 추천

dlmread doesn't round to whole numbers.
Try this
dlmwrite( 'myfile.txt', 95000.823, 'precision', '%12.3f' )
format long
val = dlmread('myfile.txt')
Did you check the content of the text-file with an editor?

카테고리

도움말 센터File Exchange에서 Text Data Preparation에 대해 자세히 알아보기

태그

질문:

2013년 11월 9일

편집:

2013년 11월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by