You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
651 B
Matlab
26 lines
651 B
Matlab
10 years ago
|
function movieList = loadMovieList()
|
||
|
%GETMOVIELIST reads the fixed movie list in movie.txt and returns a
|
||
|
%cell array of the words
|
||
|
% movieList = GETMOVIELIST() reads the fixed movie list in movie.txt
|
||
|
% and returns a cell array of the words in movieList.
|
||
|
|
||
|
|
||
|
%% Read the fixed movieulary list
|
||
|
fid = fopen('movie_ids.txt');
|
||
|
|
||
|
% Store all movies in cell array movie{}
|
||
|
n = 1682; % Total number of movies
|
||
|
|
||
|
movieList = cell(n, 1);
|
||
|
for i = 1:n
|
||
|
% Read line
|
||
|
line = fgets(fid);
|
||
|
% Word Index (can ignore since it will be = i)
|
||
|
[idx, movieName] = strtok(line, ' ');
|
||
|
% Actual Word
|
||
|
movieList{i} = strtrim(movieName);
|
||
|
end
|
||
|
fclose(fid);
|
||
|
|
||
|
end
|