Cengage Reviewer PDF
Cengage Reviewer PDF
#7
#8 IF AN EXPRESSION WITHOUT AN EQUAL SIGN
Answer: True
Answer: True
#15
Answer: TRUE
control + c
In the event that a script is running an infinite loop, the user can use the command
to halt the process and regain control.
Find
MATLAB includes the command to help you find out just which version of a file is
being executed, and where it is located. This can be useful in finding filename conflicts.
The contents of the current figure window can be cleared at any time using
Clear Figure
the command.
MATLAB does not provide a predefined value for pi. Therefore, users must define pi themselves
using mathematical functions that are built-in, e.g., pi = 4 * atan(1).
a. True
b. False
It is possible to prompt a user and initialize a variable with data typed directly using
input
the function. This function displays a prompt string in the command window and
then waits for the user to type in a response.
Array
operations are operations performed between arrays on an element-by-element
Matrix
basis. operations follow the normal rules of linear algebra, such as matrix
multiplication.
Arrays in MATLAB can have more than two dimensions, i.e., more than rows and columns.
a. True
b. False
run-time
The second type of error is the error. Such an error occurs when an illegal
mathematical operation is attempted during program execution (for example, attempting to divide
by 0). These errors cause the program to return Inf or NaN, which is then used in further
calculations.
symbolic
MATLAB includes a special debugging tool called a debugger, which is embedded
into the Edit/Debug Window. This tool allows you to walk through the execution of your program
one statement at a time, and to examine the values of any variables at each step along the way.
MATLAB always allocates array elements in order. That is, MATLAB
allocates the first column in memory, then the second, then the third, etc., until all of the columns
have been allocated.
MATLAB is a strongly typed language. This means that, before assigning a value to a variable in
MATLAB, you must first declare its type (double, char, etc.).
a. True
b. False
In mathematics, a function is an expression that accepts one or more input values and calculates a
single result from them. Like mathematical functions, MATLAB functions can return no more than
one result to the calling program.
a. True
b. False
Which of the following commands will print (in the command window) a list of the variables and
arrays in the current workspace?
a. clear
b. whos
c. control + c
d. clc
If an expression without an equal sign is typed into the Command Window, MATLAB will evaluate it
and store the result in a special variable called ans. Every time a new expression without an equal
sign is evaluated, the value saved in ans will be overwritten.
a. True
b. False
If the user creates a script or function with the same name as a MATLAB function or command,
MATLAB will always prefer and execute the built-in function or command rather than the user-
defined script or function.
a. True
b. False
When a user enters a name at the MATLAB prompt, the MATLAB interpreter first attempts to find
the name among the variables in the workspace. Therefore, if you define a variable with the same
name as a MATLAB function or command, that function or command becomes inaccessible.
a. True
b. False
#19
#20
Answers:
Array – fundamental
IN MATHEMATICS, A FUNCTION
control + c
In the event that a script is running an infinite loop, the user can use the command
to halt the process and regain control.
w hich
MATLAB includes the command to help you find out just which version of a file is
being executed, and where it is located. This can be useful in finding filename conflicts.
The contents of the current figure window can be cleared at any time using
clf
the command.
MATLAB does not provide a predefined value for pi. Therefore, users must define pi themselves
using mathematical functions that are built-in, e.g., pi = 4 * atan(1).
a. True
b. False
It is possible to prompt a user and initialize a variable with data typed directly using
input
the function. This function displays a prompt string in the command window and
then waits for the user to type in a response.
Array
operations are operations performed between arrays on an element-by-element
Matrix
basis. operations follow the normal rules of linear algebra, such as matrix
multiplication.
Arrays in MATLAB can have more than two dimensions, i.e., more than rows and columns.
a. True
b. False
run-time
The second type of error is the error. Such an error occurs when an illegal
mathematical operation is attempted during program execution (for example, attempting to divide
by 0). These errors cause the program to return Inf or NaN, which is then used in further
calculations.
symbolic
MATLAB includes a special debugging tool called a debugger, which is embedded
into the Edit/Debug Window. This tool allows you to walk through the execution of your program
one statement at a time, and to examine the values of any variables at each step along the way.
column major
MATLAB always allocates array elements in order. That is, MATLAB
allocates the first column in memory, then the second, then the third, etc., until all of the columns
have been allocated.
MATLAB is a strongly typed language. This means that, before assigning a value to a variable in
MATLAB, you must first declare its type (double, char, etc.).
a. True
b. False
In mathematics, a function is an expression that accepts one or more input values and calculates a
single result from them. Like mathematical functions, MATLAB functions can return no more than
one result to the calling program.
a. True
b. False
Which of the following commands will print (in the command window) a list of the variables and
arrays in the current workspace?
a. clear
b. whos
c. control + c
d. clc
If an expression without an equal sign is typed into the Command Window, MATLAB will evaluate it
and store the result in a special variable called ans. Every time a new expression without an equal
sign is evaluated, the value saved in ans will be overwritten.
a. True
b. False
If the user creates a script or function with the same name as a MATLAB function or command,
MATLAB will always prefer and execute the built-in function or command rather than the user-
defined script or function.
a. True
b. False
When a user enters a name at the MATLAB prompt, the MATLAB interpreter first attempts to find
the name among the variables in the workspace. Therefore, if you define a variable with the same
name as a MATLAB function or command, that function or command becomes inaccessible.
a. True
b. False
Once a plot has been created by a MATLAB program, it can no longer be modified. Therefore all
desired features should be prescribed in coding.
a. True
b. False
hold
The command prevents MATLAB from overwriting the data plotted on a figure when
a plot function is executed two or more times for that figure.
Special Greek and mathematical symbols may also be used in text strings. They are created by
embedding escape sequences into the text string. Escape sequences such as /lambda and /infty
would produce the lowercase Greek letter lambda and the infinity symbol, respectively.
a. True
b. False
MATLAB includes two functions, linspace and logspace, which address the disadvantages in the
colon operator method of creating arrays. They create an array with either linear or logarithmic
spacing between samples. When using them, you know how many points will be in the array and
that the specified last point will be in the array.
a. True
b. False
It is possible to enhance plotted text strings (titles, axis labels, etc.) with formatting such as bold
face, italics, etc., and with special characters such as Greek and mathematical symbols. The font
stream modifiers
used to display the text can be modified by .
hold off
A command switches plotting behavior back to the default situation,
in which a new plot replaces the previous one.
If a subplot command creates a new set of axes that conflict with a previously existing set, then what
happens to the older axes?
a. Deleted
Normally, a new plot is created each time that a plot command is issued, and the previous data
displayed on the figure are lost.
a. True
b. False
Once a plot has been created by a MATLAB program, it can no longer be modified. Therefore all
desired features should be prescribed in coding.
a. True
b. False
hold
The command prevents MATLAB from overwriting the data plotted on a figure when
a plot function is executed two or more times for that figure.
Special Greek and mathematical symbols may also be used in text strings. They are created by
embedding escape sequences into the text string. Escape sequences such as /lambda and /infty
would produce the lowercase Greek letter lambda and the infinity symbol, respectively.
a. True
b. False
MATLAB includes two functions, linspace and logspace, which address the disadvantages in the
colon operator method of creating arrays. They create an array with either linear or logarithmic
spacing between samples. When using them, you know how many points will be in the array and
that the specified last point will be in the array.
a. True
b. False
It is possible to enhance plotted text strings (titles, axis labels, etc.) with formatting such as bold
face, italics, etc., and with special characters such as Greek and mathematical symbols. The font
stream modifiers
used to display the text can be modified by .
hold off
A command switches plotting behavior back to the default situation,
in which a new plot replaces the previous one.
If a subplot command creates a new set of axes that conflict with a previously existing set, then what
happens to the older axes?
a. Deleted
Normally, a new plot is created each time that a plot command is issued, and the previous data
displayed on the figure are lost.
a. True
b. False
hold
The command prevents MATLAB from overwriting the data plotted on a figure
when a plot function is executed two or more times for that figure.
If a subplot command creates a new set of axes that conflict with a previously existing set, then
what happens to the older axes?
d. Deleted
(TAMA LAHAT)
plots
One of the most powerful features of MATLAB is the ability to easily create that
visualize the information which the engineer works with. In other programming languages used
by engineers (such as C++, Java, Fortran, and so forth), this would be a major task.
TAMA LAHAT
In general, if the range of the data being plotted covers many orders of magnitude,
logarithmic
a(n) scale will be more appropriate. If the data being plotted covers a relatively
logarithmic
small dynamic range, then scales work very well. ( MALI YAN RED)
MATLAB includes two functions, linspace and logspace, which address the disadvantages in the
colon operator method of creating arrays. They create an array with either linear or logarithmic
spacing between samples. When using them, you know how many points will be in the array and
that the specified last point will be in the array.
a. True
b. False
The bar and barh functions can also take two-dimensional array arguments. If an array
argument is supplied to these plots, the program will display each column as a separately
colored bar on the plot.
a. True
b. False
It is possible to enhance plotted text strings (titles, axis labels, etc.) with formatting such as bold
face, italics, etc., and with special characters such as Greek and mathematical symbols. The font
stream modifier explanation
used to display the text can be modified by . ( MALII)
If a subplot command creates a new set of axes that conflict with a previously existing set, then
what happens to the older axes?
d. Deleted
(TAMA LAHAT)
plots
One of the most powerful features of MATLAB is the ability to easily create that
visualize the information which the engineer works with. In other programming languages used
by engineers (such as C++, Java, Fortran, and so forth), this would be a major task.
TAMA LAHAT
In general, if the range of the data being plotted covers many orders of magnitude,
logarithmic
a(n) scale will be more appropriate. If the data being plotted covers a relatively
linear
small dynamic range, then scales work very well.
MATLAB includes two functions, linspace and logspace, which address the disadvantages in the
colon operator method of creating arrays. They create an array with either linear or logarithmic
spacing between samples. When using them, you know how many points will be in the array and
that the specified last point will be in the array.
a. True
b. False
The bar and barh functions can also take two-dimensional array arguments. If an array
argument is supplied to these plots, the program will display each column as a separately
colored bar on the plot.
a. True
b. False
It is possible to enhance plotted text strings (titles, axis labels, etc.) with formatting such as bold
face, italics, etc., and with special characters such as Greek and mathematical symbols. The font
stream modifiers
used to display the text can be modified by .