Handling csv file in MATLAB
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
dpb
il 4 Dic 2014
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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Develop uifigure-Based Apps in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!