MATLAB: How to delete the first word in each line in txt file txt file Hello, How can I delete the first word in each line in txt file? (words are seperated with space char ' ', there isn't ' ' char in a beggining of line) Thanks Best Answer Read the file into string or cellstr array and extractAfter() the blank.Not feasible to do on disk; don't even think of trying that way. Read the file, process and rewrite to disk. Related SolutionsMATLAB: Opening a .txt file N = dlmread('filename.txt','\t');This loads the data in the text file into the matrix N. Check here MATLAB: How to merge cells together Two alternatives, since I am not exactly sure what you want.a = num2cell(randi(10,10,10));your_mat = cell2mat(a);your_mat_alt = [a{:}]; Related Question
Best Answer