HOW CAN A .DAT FILE BE EDITED
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi; I trying to change a certain number in a DAT file, the file consists of numbers and text as shown
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/164989/image.jpeg)
The problem is every time I edit the file using commands like fprintf to overwrite the file, the external programme that supposes the read and executes the file gives me an error because it is not able to read the file anymore. please, is there a way to edit and save the file while it is still readable? Thanks
댓글 수: 12
Jan
2017년 6월 9일
편집: Jan
2017년 6월 9일
As we see in this screenshot, you try to attach a .rar file. The error message tells clearly, that this is not supported, but a .zip file would work and .txt files also.
Nevertheless, your problem is solved and attaching the file is not needed anymore.
Instead of using 'wt' in fopen, you can replace the line breaks also by '\r\n'. Beside the Editor shipped with Windows, your application seems to require the DOS linebreaks. What a pitty.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Source Control Integration에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!