can you please help how to convert a csv file into ascii format?
58 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Surya Gnyawali
am 12 Mär. 2018
Kommentiert: Adrienne Winter
am 14 Mär. 2024
I have a .csv file from a graph. I need to convert it to an ascii file format. I need to load this .ascii file on another software. please help thanks
6 Kommentare
Adrienne Winter
am 14 Mär. 2024
I had an issue where my csv was being read as an ASCII in Matlab - I saved the csv again with UTF-8 (with no BOM) from Notepad and this worked to make the csv readable (as I saw it was saved with BOM).
For anyone else who may have the same issue as me.
Akzeptierte Antwort
Walter Roberson
am 13 Mär. 2018
The file that was uploaded is already pure ASCII.
The only thing I notice is that it uses newlines alone for end of line; it is possible that the other program needs carriage-return as well as newlines. If so then
S = fileread('Wavelength (nm)_Counts.csv');
S = regexprep(S, '\n', '\r\n');
fid = fopen('Counts_with_CR.csv', 'w');
fwrite(fid, S);
fclose(fid);
Now Counts_with_CR.csv will have the same content but with CR/NL delimiter.
2 Kommentare
Walter Roberson
am 14 Mär. 2018
The code writes out a file Counts_with_CR.csv which would be what you would try with the CytoSpec software.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Convert Image Type finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!