%% Skip the Remainder of a Line
% Read the first column of the file in the previous example into a cell array, skipping the rest of the line.

filename = 'scan1.dat';
fileID = fopen(filename);
dates = textscan(fileID,'%s %*[^\n]');
fclose(fileID);
dates{1}

% textscan returns a cell array dates.
% Copyright 2012 The MathWorks, Inc.