MATLAB: Txt file to csv file csv HI, I have txt file : 11 211 43 25 65 75 8 I want this file be 11,211,43,25,6 etc. I know there is somthing relate with csv, but dont know how to use it thanks Best Answer YourData = load('YourFile.txt');csvwrite('YourNewFile.txt', YourData); Related SolutionsMATLAB: Import data into a txt file from matlab you mean export data to text file m=[1 2 3 4 5 6 6 6 7 8 9] fid = fopen('data.txt', 'w'); fprintf(fid, '%d', m); fclose(fid);works fineor dlmwrite('file.txt',m,'delimiter',' ') MATLAB: How to read a .txt file fid = fopen('filename.txt','rt'); C = textscan(fid,'%s%f%f','headerlines',1); fclose(fid); name = C{1}; LatN = C{2}; LonN = C{3}; Related QuestionReading .csv files from .txt file.How to extract a portion of a CSV file using MATLABWrite Data to .txt or .csv fileHow do import dataData extraction from .csv and .txt files
Best Answer