‘Essential MATLAB for Engineers and Scientists’ 7e
Quiz questions for Chapter 1, Lecture 1.
The correct answer is highlighted.
1. Create two variables by assigning 4 and 5 to x and y. Assign the value of x + y to
the variable z. What two statements do this correctly?
a. 4 = x; 5 = y; x+y = z
b. x = 4; y = 5; z = x+y
c. x = 4; 5 = y; z = x+y
2. To convert angles in radians to angles in degrees, which factor do you need to
multiply radians to covert to degrees correctly?
a. 2*pi/360
b. 360/(2*pi)
c. 180/(2*pi)
3. Consider the row of numbers generated by the command
>> x = 1:1:11; % How many numbers are in the list?
a. 10
b. 12
c. 11
4. Consider the row of numbers generated by the command
>> x = 1:2:11; % How many numbers are in the list?
a. 5
b. 6
c. 7
5. Plot the sine of x from 0 to pi. To do this, which command do you enter?
a. x = 0:2*pi/100:2*pi; plot(x,sin(x))
b. x = 0:2*pi/100:pi; plot(x,sin(x))
c. x = pi:2*pi/100:2*pi; plot(x,sin(x))
© 2019 Daniel Valentine. All rights reserved. Published by Elsevier.
,‘Essential MATLAB for Engineers and Scientists’ 7e
Quiz questions for Chapter 2, Lecture 2.
The correct answer is highlighted.
1. Which of the following names are valid, variable names?
a. pay-plan
b. 22d
c. watt
2. Does MATLAB recognize the difference between a and A?
a. Yes
b. No
3. If you clear and assign the variables as shown and then execute who, what
variables are in the work space?
>> clear; a = 5; Bab = 3;
a. a ans Bab
b. a Bab
c. A Bab
4. Create an array by executing the following command:
>> A = [ [1;2;3] , [4;5;6] , [7;8;9]]
>> A(2) % is equal to what number in the array?
a. 4
b. 2
c. 5
5. Consider the array created by the following command:
>> A = [ [1;2;3] , [4;5;6] , [7;8;9]]
>> A = A'
>> A(2) % is equal to what number in the array?
a. 4
b. 2
c. 6
© 2019 Daniel Valentine. All rights reserved. Published by Elsevier.
, ‘Essential MATLAB for Engineers and Scientists’ 7e
Quiz questions 3:
The correct answer is in bold.
1. The Command Window is the MATLAB window where we enter commands.
True or False
2. Which of the following windows displays previous commands you have entered?
Command Window
History Window
Old Commands Window
Command History Window
Entered Commands Window
3. The file type that we save MATLAB programs in is called a:
Function file
M-file
Code file
Doc-file
X-file
4. The result of two-hundred-eighty-three times pi divided by seven is (using MATLAB):
40.0000
0.0777
630.5719
127.0101
3.14156
5. The clc command exits MATLAB. True or False
6. MATLAB automatically puts comments in our code when we create a code and save it in
an M-File. True or False
7. Which of the following characters is used by MATLAB to perform multiplication?
~
* Æ This is the correct answer.
+
%
&
© 2019 Daniel Valentine. All rights reserved. Published by Elsevier.
Quiz questions for Chapter 1, Lecture 1.
The correct answer is highlighted.
1. Create two variables by assigning 4 and 5 to x and y. Assign the value of x + y to
the variable z. What two statements do this correctly?
a. 4 = x; 5 = y; x+y = z
b. x = 4; y = 5; z = x+y
c. x = 4; 5 = y; z = x+y
2. To convert angles in radians to angles in degrees, which factor do you need to
multiply radians to covert to degrees correctly?
a. 2*pi/360
b. 360/(2*pi)
c. 180/(2*pi)
3. Consider the row of numbers generated by the command
>> x = 1:1:11; % How many numbers are in the list?
a. 10
b. 12
c. 11
4. Consider the row of numbers generated by the command
>> x = 1:2:11; % How many numbers are in the list?
a. 5
b. 6
c. 7
5. Plot the sine of x from 0 to pi. To do this, which command do you enter?
a. x = 0:2*pi/100:2*pi; plot(x,sin(x))
b. x = 0:2*pi/100:pi; plot(x,sin(x))
c. x = pi:2*pi/100:2*pi; plot(x,sin(x))
© 2019 Daniel Valentine. All rights reserved. Published by Elsevier.
,‘Essential MATLAB for Engineers and Scientists’ 7e
Quiz questions for Chapter 2, Lecture 2.
The correct answer is highlighted.
1. Which of the following names are valid, variable names?
a. pay-plan
b. 22d
c. watt
2. Does MATLAB recognize the difference between a and A?
a. Yes
b. No
3. If you clear and assign the variables as shown and then execute who, what
variables are in the work space?
>> clear; a = 5; Bab = 3;
a. a ans Bab
b. a Bab
c. A Bab
4. Create an array by executing the following command:
>> A = [ [1;2;3] , [4;5;6] , [7;8;9]]
>> A(2) % is equal to what number in the array?
a. 4
b. 2
c. 5
5. Consider the array created by the following command:
>> A = [ [1;2;3] , [4;5;6] , [7;8;9]]
>> A = A'
>> A(2) % is equal to what number in the array?
a. 4
b. 2
c. 6
© 2019 Daniel Valentine. All rights reserved. Published by Elsevier.
, ‘Essential MATLAB for Engineers and Scientists’ 7e
Quiz questions 3:
The correct answer is in bold.
1. The Command Window is the MATLAB window where we enter commands.
True or False
2. Which of the following windows displays previous commands you have entered?
Command Window
History Window
Old Commands Window
Command History Window
Entered Commands Window
3. The file type that we save MATLAB programs in is called a:
Function file
M-file
Code file
Doc-file
X-file
4. The result of two-hundred-eighty-three times pi divided by seven is (using MATLAB):
40.0000
0.0777
630.5719
127.0101
3.14156
5. The clc command exits MATLAB. True or False
6. MATLAB automatically puts comments in our code when we create a code and save it in
an M-File. True or False
7. Which of the following characters is used by MATLAB to perform multiplication?
~
* Æ This is the correct answer.
+
%
&
© 2019 Daniel Valentine. All rights reserved. Published by Elsevier.