FA 3 - CS0019 || CANVAS

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/43

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:18 PM on 10/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

44 Terms

1
New cards

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)

2
New cards

In most continuous M&S applications, the independent variable is:

Mass

Position

Voltage

Time

Time

3
New cards

Which command opens the MATLAB editor from the command prompt?

plot

disp

input

edit

edit

4
New cards

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

5
New cards

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

6
New cards

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

7
New cards

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

8
New cards

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

9
New cards

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")

10
New cards

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

11
New cards

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

12
New cards

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

13
New cards

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

14
New cards

Which extension is used for both MATLAB scripts and function files?

.exe

.csv

.qti

.m

.m

15
New cards

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

16
New cards

For v = 1.0:-0.2:0.0, how many loop iterations occur?

6

2

10

5

6

17
New cards

Which command adds grid lines to a plot?

switch

axis equal

disp

grid on

grid on

18
New cards

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

19
New cards

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

20
New cards

A dam-embankment behavior study belongs to which continuous-system application area?

Civil engineering

Inventory counting

Text processing

Queueing only

Civil engineering

21
New cards

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

22
New cards

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

23
New cards

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

24
New cards

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

25
New cards

Which method estimates the next solution value using the current slope?

FIFO method

Switch method

Empirical distribution

Euler method

Euler method

26
New cards

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

27
New cards

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

28
New cards

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

29
New cards

Which fprintf format code is appropriate for a string?

%d

%g

%e

%s

%s

30
New cards

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

31
New cards

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

32
New cards

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

33
New cards

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

34
New cards

Which control structure is best when repetition should continue while a condition remains true?

menu function

fprintf

while loop

switch statement

while loop

35
New cards

Simulating a missile trajectory is an example of continuous modeling in:

Set theory

Document formatting

Retail accounting

Military applications

Military applications

36
New cards

In the same notation, y represents the:

Predator population

Output label

Numerical error

Prey population

Predator population

37
New cards

How many times does for v = 1:10 execute its body?

9

1

10

11

10

38
New cards

What keyword closes a MATLAB if statement?

endif only

end

stop

close

end

39
New cards

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

40
New cards

In the Lotka-Volterra notation from the module, x represents the:

Predator population

Conservation constant

Simulation time step

Prey population

Prey population

41
New cards

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

42
New cards

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

43
New cards

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

44
New cards

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