True or False
Terminology
This is missing in the script
MATLAB Commands
What is the output?
100
A nested loop describes a loop that appears within the body of another loop.
What is true?
100
A block of code that repeats itself.
What is a loop?
100
%for loop code; sum=1; product = 2; for k=1:3; sum = sum + 0.5^k; product = product*2;
What is the end command?
100
This command calculates the standard deviation of an array.
What is std?
100
X= 4000; X = 1200; X = 700
What is 700
200
The hold command allows a user to create multiple graphs on the same plot.
What is true.
200
A loop programmed to repeat until some condition is no longer met.
What is a conditional loop.
200
% conditional loop code;; while x <= 5; x = x +1; end
What is initializing/defining the variable. x = 1;
200
Returns the determinant of the square matrix.
What is det?
200
x = [1 2 3 4 5 6]; y = x(1, 3 )
What is 3?
300
A loop condition is only checked once during each iteration.
What is true?
300
This term describes an execution of a loop body.
What is an iteration?
300
type = menu('What is the wall material?', 'CMU', 'Concrete'); if type == 1; Wt = 100; else; Wt = 150; end
What are the code comments?
300
This command would set a plot’s x axis to range from 50 to 500, and its y axis from 0 to 5.
What is axis([50, 500, 0, 5])?
300
%while loop; x = 0; sum = 4; while sum < 5; x = x + 1; sum = sum + x; end disp(sum)
What is sum = 5
400
A otherwise statement is required in a switch statement.
What is false?
400
This happens when a loop command results in never-ending iterations.
What is an infinite loop?
400
name = 'Nicole'; fprintf('My name is %', name)
What is the 's' after % to denote the variable is a string?
400
This command will load variables saved to a ‘variables’ file onto the current work space.
What is load(‘variables’) or load variables?
400
x = [ 2 3]; y = [2;3;5]; z = x * y
What is error?
500
In a conditional for loop, the variable in the loop must be defined before the loop script.
What is false?
500
This is used to count the number of iterations in a loop.
What is a loop variable?
500
sampleNums = [[1, 2, 3]; [4, 5, 6]; 7, 8, 9]]; elmtRow3Col2 = sampleNums(3,2)
What is the '[' before 7?
500
This command will plot variables x and y using a blue dashed line and circle markers at each data point.
What is plot(x, y, 'bo--')?
500
% while loop; x = 1; y = 1; while x <= 5; y = y +1; end; disp(y)
What is an infinite loop?
Continue
ESC
Reveal Correct Response
Spacebar
M
e
n
u
Team 1
0
+
-
MATLAB UCD
No teams
1 team
2 teams
3 teams
4 teams
5 teams
6 teams
7 teams
8 teams
9 teams
10 teams
Custom
Press
F11
Select menu option
View > Enter Fullscreen
for full-screen mode
Edit
•
Print
•
Download
•
Embed
•
Share
JeopardyLabs