Please help me with these! I will upvote you ;) MATLAB
Given the following problem, answer questions below.
This problem was on a past exam, so you should be comfortable doing it!
The following function takes in a structure array of movie data as the first input and name of a review website as the second input.
\
The following is then run in your command window
site = 'Rotten - Tomatoes';
out = movieReview(movies, site)
%Question 1:
% What is the value stored in 'out' after the function is run?
% (You'll have to create the structure using either the struct function or dot operator)
quest1 = [];
%Question 2:
%You decide to remove the field 'Director' from the movies after line2. Which choice accomplishes this?
% 'A': movie.Director = [];
% 'B': movies = rmfield(movies,'Director');
% 'C': rmfiled(movies,'Director');
% 'D': movies = movies(~strcmp(movies,'Director'));
quest2 = [] %Your answer should be either 'A','B','C', or 'D'
%Question 3:
%Suppose Line 8 is changed to :
% title = movies.Title;
% Does this change the value of title?
%If yes, set the following variable to true, if not set it to false
quest3a = [];
%If you believe it changes, what will the new value of title be?
quest3b = []; %leave this as [] if you think it doesn't change.
%Question 4:
%You realize 'movies' (a 1xN) is missing data bout several different movies.
%A second 1xM structure array with the same fieldnames is stored in 'moreMovies'.
%How can you add this new structure array to the original one thus creating a 1x(N+M)?
%SELECT ALL THAT APPLY
% 'A': movies = [movies, moreMovies];
% 'B': movies = {movies, moreMovies};
% 'C': movies = [{movies, moreMovies}];
% 'D': movies(end+1:end+length(moreMovies)) = moreMovies;
%You answer should be a string with all of the correct options in alphabetical order
%separated by a single comma. For example, if you think all of them are correct,
%your answer should be 'A,B,C,D'
quest4 = [];
%Question 5:
%Which of the following will perform the same task as the for loop
%in lines 15 through 17?
%SELECT ALL THAT APPLY
% 'A': movies.Number = 1:length(movies);
% 'B': movies.Number = {1:length(movies)};
% 'C': movies(:).Number = 1:length(movies);
% 'D': None of the Above
%You answer should be a string with all of the correct options in alphabetical order
%separated by a single comma. For example, if you think the first 3 are correct,
%your answer should be 'A,B,C'
quest5 = [];