filename = 'your_file.txt'; % Specify the name of the text filefileID = fopen(filename, 'r'); % Open the file for reading% Read the entire file line by linefori = 1:40 line = fgetl(fileID);
disp(line); % Display the current line to the command windowendfclose(fileID); % Close the file