Font size
WorksheetsExam3 Review
Total questions: 11
Worksheet time: 7mins
Do you plan on taking the final exam?
yes
most likely yes
most likely no
no
The following line is run in matlab: a = dir()
What is contained in the variable a?
a cell array containing all filenames from the current directory
a structure with fieldnames: name, folder, date, bytes, isdir, datenum
a cell array with headers: name, folder, date, bytes, isdir, datenum
nothing, it just opens all files in the directory
how would you loop through a structure?
A structure contains a field called tvShow containing strings and ratings containing doubles. A loop is created to make a cell array of the tvShows that have ratings higher than 3. Fill in the missing line of code:
(a)
how do you read in an image?
fopen()
read()
imread()
imopen()
when you use the rgb2gray function to grayscale and image, what do you get in return?
3D array of grayscaled image
2D array of grayscaled image
1D array of grayscaled image
a new file containing the grayscaled image
how do you concatenate three arrays on top of each other to create an image?
how do you flip an image horizontally (over the y axis)?
how would you flip an image vertically (over the x axis)?
To loop through every line in a file what would be the terminating condition? (enter answer with no spaces)
(a)
You are writing a function that takes in a fieldname as an input. How would you access the value of that field at a certain location using the dot operator?
