Read text without converting to date
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm using both csvread and xlsread to read in a .csv file with hex data as text. Two of the values are '7DEC' and 'FEB6', but they are being auto-converted to '12/7/2023' and '2/6/2023' in the output cell. Is there a way to prevent this?
2 Commenti
Risposte (2)
dpb
il 27 Set 2023
writematrix(["7DEC","FEB6","FFFE","ABCD"],'test.csv')
type test.csv
data=readcell('test.csv')
fid=fopen('test.csv','r');
data=textscan(fid,'%x','delimiter',',')
fid=fclose(fid)
data{:}
Depending upon whether you want it converted or not on input.
0 Commenti
Vedere anche
Categorie
Scopri di più su Text Files 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!