Open a file and pass the file identifier to the fgetl function to read data.
Open the file, tsunamis.txt, and obtain the file identifier.
%Open the file, tsunamis.txt, and obtain the file identifier.
fileID = fopen('tsunamis.txt');
%Pass the fileID to the fgetl function to read one line from the file.
tline = fgetl(fileID);
Open a file and pass the file identifier to the fgetl function to read data.
Open the file, tsunamis.txt, and obtain the file identifier.