MATLAB: How to read a text file with header and data lines in it with special characters fb matlabMATLAB Example of data file: mydata.txt See the attachment This gives values only on the first data line. How to read all and ignore the last two lines? Thanks cbhat@fnal.gov Best Answer doc readtable Related SolutionsMATLAB: Import txt file containing some comment character = “#” Mention: ....'CommentStyle','#')fileID = fopen(filename); %an example C = textscan(fileID,formatspec','Delimiter',',','CommentStyle','#');fclose(fileID); MATLAB: How to Load from .txt file while suppressing listing load('mydata.txt'); Related QuestionCannot Read data from text fileHow to include a data file with the standalone executable generated with the MATLAB Compiler 4.0 (R14)Add new line inside text fileDelimiting a text file like “Text to columns”Read time and numerical data from txt file and plot in matlab.
Best Answer