1/43
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Which sequence correctly produces a basic MATLAB function plot?
Define only a title
Define x, compute y=f(x), then call plot(x,y)
Call plot before defining x and y
Use input without a function
Define x, compute y=f(x), then call plot(x,y)
In most continuous M&S applications, the independent variable is:
Mass
Position
Voltage
Time
Time
Which command opens the MATLAB editor from the command prompt?
plot
disp
input
edit
edit
Why are numerical solution techniques commonly needed for continuous systems?
All state variables are categorical
Numerical methods eliminate initial conditions
Continuous systems never use equations
Many resulting differential equations are not analytically integrable
Many resulting differential equations are not analytically integrable
What does disp(X) do?
Creates a user-defined function
Reads X from the keyboard
Saves X to a file
Displays the value without printing the variable name
Displays the value without printing the variable name
What is a user-defined MATLAB function?
A script that can never return output
A built-in operating-system command
A programmer-created function usable from a script or Command Window
A plot that accepts no data
A programmer-created function usable from a script or Command Window
Which feature most directly distinguishes a continuous system?
The system cannot produce outputs
All variables must be integers
State variables change only at isolated events
State variables evolve continuously with time
State variables evolve continuously with time
Why is \n commonly included at the end of an fprintf format string?
To suppress all text
To move output to a new line
To convert a number to a matrix
To multiply the output
To move output to a new line
Which command correctly requests string input?
name = disp("Enter name: ","s")
name = input("Enter name: ","s")
name = fprintf("Enter name: ")
name = input("Enter name: ")
name = input("Enter name: ","s")
Which control structure is best when the number of repetitions is known in advance?
switch statement
for loop
while loop only
input command
for loop
A MATLAB LineSpec can combine which properties?
Title, filename, and input prompt
Color, line type, and marker
Loop, condition, and function
Rows, columns, and workspace
Color, line type, and marker
What do state-variable equations describe?
Only the initial values of outputs
How system state changes with respect to the independent variable
Only the desired report format
The file location of the model
How system state changes with respect to the independent variable
When prey becomes plentiful, what does the model predict next?
Both populations become constant
Prey growth becomes independent of predators
Predators gain food and their population tends to increase
Predators immediately vanish
Predators gain food and their population tends to increase
Which extension is used for both MATLAB scripts and function files?
.exe
.csv
.qti
.m
.m
After deriving the governing equations, what is the next strategic task?
Replace the outputs with text labels
Convert the system into a discrete queue
Choose an appropriate numerical implementation
Remove initial conditions
Choose an appropriate numerical implementation
For v = 1.0:-0.2:0.0, how many loop iterations occur?
6
2
10
5
6
Which command adds grid lines to a plot?
switch
axis equal
disp
grid on
grid on
What does MATLAB menu return after a user presses a button?
The number of the selected button
The label as a matrix only
No value
A plot handle only
The number of the selected button
What is the effect of axis equal?
It creates a square matrix
It uses equal scale factors on both axes
It deletes axis labels
It forces equal x and y values
It uses equal scale factors on both axes
A dam-embankment behavior study belongs to which continuous-system application area?
Civil engineering
Inventory counting
Text processing
Queueing only
Civil engineering
If an Euler simulation is inaccurate because the step is too large, the most direct improvement is to:
Delete the initial condition
Reduce the time-step size
Replace time with an integer label
Increase every state value
Reduce the time-step size
A continuous model script must select a smaller numerical step when estimated error is high. Which design best fits?
Use disp only
Store the error only as a plot title
Use a switch with no cases
Use a loop with an if condition that tests the error and adjusts the step
Use a loop with an if condition that tests the error and adjusts the step
For a planetary-orbit model, which is the most appropriate state vector?
Mass of the sun alone
Three-dimensional position and velocity
Planet name and color
Only elapsed time
Three-dimensional position and velocity
Which pair consists only of typical continuous state variables?
Event number and server count
Queue length and customer count
Job ID and priority code
Position and velocity
Position and velocity
Which method estimates the next solution value using the current slope?
FIFO method
Switch method
Empirical distribution
Euler method
Euler method
What is the primary purpose of an output equation?
To define the operating system
To calculate quantities required by the simulation consumer
To select the integration step automatically
To replace all state equations
To calculate quantities required by the simulation consumer
Which strategy should come first when building a continuous model?
Select a random queue discipline
Translate the system physics into quantitative equations
Write a report generator
Choose plot colors
Translate the system physics into quantitative equations
Compared with a basic Euler method, why might Runge-Kutta be selected?
It converts continuous variables to strings
It generally obtains better accuracy by evaluating slopes within a step
It guarantees an exact closed-form solution
It requires no function evaluations
It generally obtains better accuracy by evaluating slopes within a step
Which fprintf format code is appropriate for a string?
%d
%g
%e
%s
%s
Which statement correctly distinguishes a MATLAB script from a function?
A function cannot have local variables
A script must return one output
Only scripts use the .m extension
A script uses workspace data, while a function can accept inputs and return outputs
A script uses workspace data, while a function can accept inputs and return outputs
When predators overhunt prey, which sequence is most plausible?
Predators increase forever
Prey and predators instantly become zero
Prey declines, predators later decline, then prey can recover
Prey declines while predators remain permanently unchanged
Prey declines, predators later decline, then prey can recover
Variables created inside a MATLAB function are generally:
Required to be strings
Automatically global
Always stored in the base workspace
Local to the function
Local to the function
A conservation law that remains constant along a predator-prey trajectory is useful because it:
Removes all parameters
Makes populations integer-valued
Eliminates both differential equations
Characterizes allowable solution orbits
Characterizes allowable solution orbits
Which control structure is best when repetition should continue while a condition remains true?
menu function
fprintf
while loop
switch statement
while loop
Simulating a missile trajectory is an example of continuous modeling in:
Set theory
Document formatting
Retail accounting
Military applications
Military applications
In the same notation, y represents the:
Predator population
Output label
Numerical error
Prey population
Predator population
How many times does for v = 1:10 execute its body?
9
1
10
11
10
What keyword closes a MATLAB if statement?
endif only
end
stop
close
end
Why must the selected state variables be complete?
They must always be directly observable
They must remain constant during a run
They must contain enough information to reproduce relevant system behavior
They must include every possible physical detail
They must contain enough information to reproduce relevant system behavior
In the Lotka-Volterra notation from the module, x represents the:
Predator population
Conservation constant
Simulation time step
Prey population
Prey population
In f=b-py, increasing predator population y has what effect on prey per-capita growth f?
It increases f
It makes f equal to x
It decreases f
It leaves f unchanged
It decreases f
Which structure is most appropriate for choosing among several mutually exclusive numeric ranges?
plot only
A comment block
if-elseif-else
A single disp command
if-elseif-else
In g=rx-d, increasing prey population x has what effect on predator per-capita growth g?
It removes parameter r
It forces g to zero
It increases g
It decreases g
It increases g
Which statement best explains population cycles in the predator-prey model?
The model contains no feedback
Only prey affects prey
Both populations are independent
Changes in each population alter the growth rate of the other
Changes in each population alter the growth rate of the other