1. From what distribution does the rand() function return value?
2. Based on the code below, c is the _ of a. a = rand(1, 11); b = sort(a); c = b(1, ceil(end/2));
3. What does the Profiler track?
4. What is %% used for?
5. What is the . character NOT used for?
6. Which function could you use for multiple linear regression?
7. For which of these arrays do mean, median, and mode return the same value?
8. 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)
9. How do you access the value for the field name in structure S?
10. What built-in definition does i have?
11. 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?
12. Which function CANNOT be used to randomly sample data?
13. What is true of a handle class object?
14. Which statement could create this cell array? c = {["hello world"]} {1×1 cell} {["goodbye"]} {1×3 double}
15. Which choice adds b to each row of a? a = ones(4, 4); b= [1 2 3 4];
16. Which statement returns the roots for the polynomial x^2 + 2x - 4?
17. Which choice is the proper syntax to append a new elements a to the end of 1x 2 dimensional cell array C?
18. 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?
19. Which statement returns a cell array of the strings containing 'burger' from menu? Menu = {'hot dog' 'corn dog' 'regular burger' 'cheeseburger' 'veggie burger'}
20. Which statement is true about the sparse matrices?
21. Which statement using logical indices will result in an error? A = 1:10;
22. 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'};
23. Which is NOT a function that adds text to a plot?
24. What kind of files are stored with the .mat extension?
25. Which statement returns 1 (true)? a = 'stand' b = "stand"
26. Where in the UI can you see what variables have been created, their values, and their class?
27. 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;
28. Which command will create a 10-element vector v with values from 1 to 10?
29. For a 5 x 5 array, the two subscript index (4,2) indexes the same location as linear index ___.
30. What is a difference between global variable and persistent variables?
31. How is the random seed for MATLAB's random number generator first initializedin a MATLAB Session?
32. 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?
33. Which statement will return all the odd numbers from 1 to 9?
34. What is the size of b? a = [1 2 3]; b = repmat(a,2,3);
35. Which statement reverses vector a? A = [ 1 2 3 4];
36. Which command will create a column vector with the values 7, 8, and 9?
37. What do you call in the command window to see all the variables in the workspace and their classes?
38. 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?
39. What is a reason to save a MAT-file using the -v7.3 flag?