Effacer les filtres
Effacer les filtres

Handling csv file in MATLAB

1 vue (au cours des 30 derniers jours)
Yongmin
Yongmin le 4 Déc 2014
Commenté : dpb le 4 Déc 2014
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 commentaire
dpb
dpb le 4 Déc 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by