Skip to Content

Build your own quiz

27 questions

Show Answers

See Preview

- 1. Open EndedAfter running a program, a list of all variables assigned and the values for each are viewable in the
- 2. Fill in the BlankTo save a program that has been written in the editor, the _______ panel must be selected (blue top bar)
- 3. Fill in the BlankBecause the workspace is shared by any code that is run, either from a script file or the command window, at the beginning of each program we include the command _____ to remove all variables from the workspace.
- 4. Open EndedFor a program to run as expected, the Current Folder must be set to the same location as the program file. (True/False)
- 5. Open EndedWhen should you include markers on a plot?
- 6. Open EndedWhich command can be used so that the results of more than one plot command will display in the same figure window?
- 7. Open EndedWhen should you include a legend on a plot?
- 8. Open EndedWhat does the command plot(x,y) do?
- 9. Open EndedA well-defined plot includes:
- 10. Open EndedWhich of the following commands correctly adds the x-label "time (s)" to a plot?
- 11. Open EndedWhat symbol is used to designate a comment in Matlab?
- 12. Open EndedWhat does the semi-colon at the end of a line do?
- 13. Open EndedWhat is the correct way to enter the following matrix in MATLAB?
- 14. Open EndedWhat does the 'clc' command do?
- 15. Open EndedWhich of the following IS a valid Matlab file name? Hint: The rules for filenames are the same as the rules for variable names. Try each out if you're not sure.
- 16. Open EndedIf x = 8 and y = 2, what will be the result of the statement x = x + y?
- 17. Open EndedWhat does MATLAB stand for?
- 18. Open EndedWhat does the 'dot' before a multiplication (*) or division (/) indicate? (for example, a.*b or a./b)
- 19. Open EndedRecall that the numerical derivative between two points (t_1, v_1) and (t_2, v_2) by the finite difference method is (v_2 - v_1)/(t_2 - t_1). Assume that MATLAB vectors t and v are defined and of equal length. Which of the following code snippets will calculate the numerical derivative for each pair of points in t and v?
- 20. Open EndedFor a vector v containing n elements, how many elements would the result vector of diff(v) contain?
- 21. Open EndedTo calculate the numerical integration of a sequence of values (y) with respect to (x), which command should be used?
- 22. Open EndedIf for a given X and Y, the MATLAB function cumtrapz returns the vector:[p_1 p_2 p_3 p_4],then a call to trapz with the same X and Y will return:
- 23. Open EndedIf we were to conduct several experiments with the same spring, in general the value we find for k will be
- 24. Open EndedWhen we plot the measured data of force vs displacement, the data do not fall exactly on a straight line because:
- 25. Open EndedThere are many different reasons we might use data fitting techniques. In the spring example we used data fitting techniques because we wanted to
- 26. Open EndedSelect the vector which represents the polynomial y(x) = 5.1x2 + 17.2x + 15.3
- 27. Open EndedSelect the polynomial represented by the vector [5.1 10.6 5.4]
- Answer choicesTagsAnswer choicesTags