0% found this document useful (0 votes)
6 views

CH1_Q1_CENGAGE.pdf

The document discusses various aspects of MATLAB, including workspace management, command execution, and help functionalities. It highlights the importance of variable naming and the implications of using the same name for variables and functions. Additionally, it covers MATLAB's advantages and disadvantages, as well as features like auto-complete and command evaluation.

Uploaded by

AC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CH1_Q1_CENGAGE.pdf

The document discusses various aspects of MATLAB, including workspace management, command execution, and help functionalities. It highlights the importance of variable naming and the implications of using the same name for variables and functions. Additionally, it covers MATLAB's advantages and disadvantages, as well as features like auto-complete and command evaluation.

Uploaded by

AC
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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
The contents of the current workspace can also be examined with a GUI-based Workspace Browser.
right
The Workspace Browser appears by default on the -hand side of the desktop.
MATLAB has many advantages compared to conventional computer languages for technical problem
solving. Which of the following is not one of them?

a. Ease of use

b. Platform independence

c. Predefined functions

d. Low cost

Instead of typing commands directly in the Command Window, a series of commands can be placed
into a file, and the entire file can be executed by typing its name in the Command Window. Such
script
files are called files.

MATLAB has two principal disadvantages. One of them is its cost. The other is that it is
interpreted
a(n) language, and therefore can execute more slowly
compiled
than languages.
Which of the following statements correctly describes the functionality of the help and lookfor
commands?

a. Both commands will attempt to find an exact function name match for the phrase typed following the command

b. Both commands will search the quick summary information in each function to find a match for the phrase

typed following the command

c. The lookfor command has the functionality described in (a), but the help command has the functionality

described in (b)

d. The help command has the functionality described in (a), but the lookfor command has the functionality

described in (b)

The contents of the current figure window can be cleared at any time using
clf
the command.

There is an auto-complete feature in MATLAB. If a user starts to type a command and then presses
the Tab key, a popup list of recently typed commands and MATLAB functions that match the string
will be displayed.

This study source was downloaded by 100000887842400 from CourseHero.com on 07-18-2024 07:16:57 GMT -05:00

https://www.coursehero.com/file/87446709/CH1-Q1-CENGAGEpdf/
a. True
b. False
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
Which of the following is the fundamental unit of data in any MATLAB program?

a. Bit

b. Scalar

c. Vector

d. Array

While useful in a pinch, the built-in MATLAB functions are typically less efficient than the alternatives
that an individual engineer could write on his or her own. Thus, one should avoid using them when
time permits.

a. True
b. False
If a statement is too long to type on a single line, it may be continued on successive lines by typing
an ellipsis (...) at the end of the first line, and then continuing on the next line.

a. True
b. False
MATrix LABoratory
MATLAB, which is short for , is a special-purpose computer program
optimized to perform engineering and scientific calculations.
There are three ways to get help in MATLAB. Which of the following is not one of them?

a. help command

b. lookup command

c. Help Browser

d. lookfor command
which
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.

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.

This study source was downloaded by 100000887842400 from CourseHero.com on 07-18-2024 07:16:57 GMT -05:00

https://www.coursehero.com/file/87446709/CH1-Q1-CENGAGEpdf/
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. clc

d. control + c

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
abort
In the event that a script is running an infinite loop, the user can use the command
to halt the process and regain control.

This study source was downloaded by 100000887842400 from CourseHero.com on 07-18-2024 07:16:57 GMT -05:00

https://www.coursehero.com/file/87446709/CH1-Q1-CENGAGEpdf/
Powered by TCPDF (www.tcpdf.org)

You might also like