midterm1review

# midterm1review - Midterm 1 Review These questions are...

This preview shows pages 1–4. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What will be in x after the command: >> x = f(); (a) 7 (b) f(7) (c) answer (d) error (e) none of these 4. (2 pts) Consider the function f: function [] = f(x) output = 7; end What will be in x after the command: >> x = f(3); (a) 7 (b) f(7) (c) ans (d) error (e) none of these 5. (2 pts) Which expression tests whether variable x is between (but not the same as) the values 5 and 10. (a) 5 < x < 10 (b) 5 <= x <= 10 (c) (d) (e) none of these 6. (2 pts) Which of the following is a MATLAB expression for testing “x is outside the range from 3 to 5” (the range includes 3 and 5)? (a) (b) 3 > x | x < 5 (c) 3 > x | x > 5 (d) cannot be expressed in MATLAB (e) none of the above 2
7. (2 pts) In MATLAB the value 1 is true, and true is: (a) there are no boolean types in MATLAB (b) any value that isn’t zero (c) 1 (d) 0 (e) none of the above 8. (2 pts) A call to zeros(2) will produce which of the following? (a) 0 0 (b) 0 0 0 0 (c) 0 0 (d) error (e) none of these 9. (2 pts) A call to ones(2) will produce which of the following? (a)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 10

midterm1review - Midterm 1 Review These questions are...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online