1function movieList = loadMovieList() 2%GETMOVIELIST reads the fixed movie list in movie.txt and returns a 3%cell array of the words 4% movieList = GETMOVIELIST() reads the fixed movie list in movie.txt 5% and returns a cell array of the words in movieList. 6 7 8%% Read the fixed movieulary list 9fid = fopen('movie_ids.txt'); 10 11% Store all movies in cell array movie{} 12n = 1682; % Total number of movies 13 14movieList = cell(n, 1); 15for i = 1:n 16 % Read line 17 line = fgets(fid); 18 % Word Index (can ignore since it will be = i) 19 [idx, movieName] = strtok(line, ' '); 20 % Actual Word 21 movieList{i} = strtrim(movieName); 22end 23fclose(fid); 24 25end 26 27