1. What is a reason to save a MAT-file using the -v7.3 flag?
Answer
Correct Answer:
To include a variable greater that 2GB
Note: This Question is unanswered, help us to find answer for this one
2. You wrote a new function named snap in an m-file and when you call it, you're not getting the output you expect. You previously wrote a different function named snap, which you think might also be on the search path. Which command can you use to see if the old snap function is being called?
Answer
Correct Answer:
Which
Note: This Question is unanswered, help us to find answer for this one
3. What do you call in the command window to see all the variables in the workspace and their classes?
Answer
Correct Answer:
Whos
Note: This Question is unanswered, help us to find answer for this one
4. Which command will create a column vector with the values 7, 8, and 9?
Answer
Correct Answer:
C = [7; 8; 9]
Note: This Question is unanswered, help us to find answer for this one
5. Which statement reverses vector a? A = [ 1 2 3 4];
Answer
Correct Answer:
A(end:- 1:1)
Note: This Question is unanswered, help us to find answer for this one
6. What is the size of b? a = [1 2 3]; b = repmat(a,2,3);
Answer
Correct Answer:
2x9
Note: This Question is unanswered, help us to find answer for this one
7. Which statement will return all the odd numbers from 1 to 9?
Answer
Correct Answer:
1:2:9
Note: This Question is unanswered, help us to find answer for this one
8. You've just plotted some data and want to change the color behind the lines you've plotted to black. Which code block will accomplish this?
Note: This Question is unanswered, help us to find answer for this one
9. How is the random seed for MATLAB's random number generator first initializedin a MATLAB Session?
Answer
Correct Answer:
Seed is set to a static default value on startup.
Note: This Question is unanswered, help us to find answer for this one
10. What is a difference between global variable and persistent variables?
Answer
Correct Answer:
Global variables are accessible outside the function scope; persistent variables are not.
Note: This Question is unanswered, help us to find answer for this one
11. For a 5 x 5 array, the two subscript index (4,2) indexes the same location as linear index ___.
Answer
Correct Answer:
9
Note: This Question is unanswered, help us to find answer for this one
12. Which command will create a 10-element vector v with values from 1 to 10?
Answer
Correct Answer:
V = 1:10
Note: This Question is unanswered, help us to find answer for this one
13. If you run this piece of code, you will get an error. Why? a = [0 1 2 3; 4 5 6 7]; a = a^2;
Answer
Correct Answer:
You are attempting to multiply a non-square matrix by itself, causing a dimension mismatch.
Note: This Question is unanswered, help us to find answer for this one
14. Where in the UI can you see what variables have been created, their values, and their class?
Answer
Correct Answer:
Workspace
Note: This Question is unanswered, help us to find answer for this one
15. Which statement returns 1 (true)? a = 'stand' b = "stand"
Answer
Correct Answer:
a == b
Note: This Question is unanswered, help us to find answer for this one
16. What kind of files are stored with the .mat extension?
Answer
Correct Answer:
Stored variable files
Note: This Question is unanswered, help us to find answer for this one
17. Which is NOT a function that adds text to a plot?
Answer
Correct Answer:
Label
Note: This Question is unanswered, help us to find answer for this one
18. Which statement creates a logical array that is 1 if the element in passwords contains a digit and 0 if it does not? Passwords = {'abcd' '1234' 'qwerty' 'love1'};
Note: This Question is unanswered, help us to find answer for this one
19. Which statement using logical indices will result in an error? A = 1:10;
Answer
Correct Answer:
B = a(a>6 && a<9)
Note: This Question is unanswered, help us to find answer for this one
20. Which statement is true about the sparse matrices?
Answer
Correct Answer:
Sparse matrices always use less memory than their associated full matrices.
Note: This Question is unanswered, help us to find answer for this one
21. Which statement returns a cell array of the strings containing 'burger' from menu? Menu = {'hot dog' 'corn dog' 'regular burger' 'cheeseburger' 'veggie burger'}
Answer
Correct Answer:
Menu(contains(menu, 'burger'))
Note: This Question is unanswered, help us to find answer for this one
22. You have loaded a dataset of people's heights into a 100 x 1 array called height. Which statement will return a 100 x 1 array, sim_height, with values from a normal distribution with the same mean and variance as your height data?
Note: This Question is unanswered, help us to find answer for this one
27. What is true of a handle class object?
Answer
Correct Answer:
All copies of handle objects refer to the same underlying object.
Note: This Question is unanswered, help us to find answer for this one
28. Which function CANNOT be used to randomly sample data?
Answer
Correct Answer:
Resample
Note: This Question is unanswered, help us to find answer for this one
29. You have plotted values of cosine from -10 to 10 and want to change the x-axis tick marks to every pi, from -3pi to 3pi. Which statement will do that?
Answer
Correct Answer:
Xticks(-3pi:pi:3pi)
Note: This Question is unanswered, help us to find answer for this one
30. What built-in definition does i have?
Answer
Correct Answer:
Basic imaginary unit
Note: This Question is unanswered, help us to find answer for this one
31. How do you access the value for the field name in structure S?
Answer
Correct Answer:
S.name
Note: This Question is unanswered, help us to find answer for this one
32. You are in the middle of a long MATLAB session where you have performed many analyses and made many plots. You run the following commands, yet a figure window doesn't pop up on the top of your screen with your plot. What might be the issue? x = [-1:0.1:1]; y = X.^2; plot(x, y)
Answer
Correct Answer:
Your plot is in a figure window that was already open, hidden behind other windows on your screen.
Note: This Question is unanswered, help us to find answer for this one
33. For which of these arrays do mean, median, and mode return the same value?
Answer
Correct Answer:
[0 1 1 1 2]
Note: This Question is unanswered, help us to find answer for this one
34. Which function could you use for multiple linear regression?
Answer
Correct Answer:
Regress
Note: This Question is unanswered, help us to find answer for this one
35. What is the . character NOT used for?
Answer
Correct Answer:
Cell array access
Note: This Question is unanswered, help us to find answer for this one
36. What is %% used for?
Answer
Correct Answer:
Code sections
Note: This Question is unanswered, help us to find answer for this one
37. What does the Profiler track?
Answer
Correct Answer:
Execution time
Note: This Question is unanswered, help us to find answer for this one
38. Based on the code below, c is the _ of a. a = rand(1, 11); b = sort(a); c = b(1, ceil(end/2));
Answer
Correct Answer:
Median
Note: This Question is unanswered, help us to find answer for this one
39. From what distribution does the rand() function return value?
Answer
Correct Answer:
Uniform
Note: This Question is unanswered, help us to find answer for this one