Source data file corrupted when using dlmread

조회 수: 4 (최근 30일)
Matt Green
Matt Green 2011년 3월 9일
Hi, I have searched for a solution to this problem and have'nt found any info.
I am using dlmread to read a .dat file. This works fine the first couple of times, but then on the third or fourth attempt, the following error occurs:
''Mismatch between file and format string.Trouble reading number from file (row 1, field 2)==> ¦ÿ ''
To check the .dat file, I then try and open it using openoffice. It opens but not as normal- numbers appear as code.
Is it possible that using dlmread is altering the source file? Thanks M Green

답변 (1개)

Walter Roberson
Walter Roberson 2011년 3월 9일
I don't see how it could, at least not in 2008b. dlmread is a .m file that you can examine; it uses fopen() to open the file in default reading mode, and textscan() to read the file.

카테고리

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