% Sample file to import data in Matlab using the
% Textscan command

% Sample data file

% Name  	Country  	Completed  	 Length (m) 
% Mackinac	United States	1957	8038 
% Xiasha	China	1991	8230 
% Virginia-Dare-Memorial	United States	2002	8369 

fid = fopen('bridges_of_the_world_short')      % open the file

readHeader = textscan(fid, '%s', 4, 'delimiter', '|')      % read four columns in first row
readData = textscan(fid, '%s %s %f %f')                     % read four columns with two strings and two floating point (numbers)
fclose(fid)