Handling csv file in MATLAB
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to read a csv file made by a DBMS.
If I load the csv file with uiopen, the first data (1st row, 1st column) shows an extended character that MATLAB cannot handle. However, the file can be read without any problem when Windows applications such Excel, Wordpad, or Notepad open it. For example, I attached a table showing "Import" window in MATLAB.
1 i≫¿0000062
2 00000ba
3 0000100
The first data is originally 0000062 but in MATLAB the characters, i≫¿, are inserted unintentionally.
Would you please suggest how to solve the problem? Many thanks!
댓글 수: 1
dpb
2014년 12월 4일
First check and see if there are any settings within the DBMS to change that can cause it to not write the bum data to begin with.
If that brings no joy, are the same characters extant in each and every file? If so, determine what they are or if there are always precisely the same number, read the file in as binary into a character array and delete those characters. Then either process the file from memory or rewrite it back out in uncorrupt form and use importdata or csvread or the like.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!