Using importdata function without importing the first line of text file
Show older comments
I am trying to import the data from different text files, but I don't want to import the first line of those files. My text files contain data like this.

So, I use the IMPORTDATA function to import all contents except the first line.
filename{k} = importdata (name{k}, ' ', 1);
While the name variable is a cell array that keeps the names of my files and filename is used to keep those contents. As my understanding, this function should return all content in the file except the first line and keep in the filename variable. However, when I printed out the value of filename, I got only the first line not the other content that I want. What I got is shown below.

So, is there anything I have missed? Please help!
Accepted Answer
More Answers (0)
Categories
Find more on Text Data Preparation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!