Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 14 pages
Exam (elaborations)

PSU CMPSC200 MIDTERM EXAM QUESTIONS WITH SOLUTIONS

Document preview thumbnail
Preview 2 out of 14 pages

PSU CMPSC200 MIDTERM EXAM QUESTIONS WITH SOLUTIONS

Content preview

PSU CMPSC200 MIDTERM EXAM
QUESTIONS WITH SOLUTIONS
MATLAB generally interprets computer code line by line from the top to the
bottom of a program. - -True

- Volatile Memory - -Temporary data storage

- Non-volatile Memory - -Permanant data storage

- Main Memory - -Stores programs and program data into random access
memory

- Arithmetic and Logic Unit (ALU) - -Performs mathematical operations

- Which of the following are characteristics of computers? - -1. Do not tire
2. Follow instructions precisely
3. Are reliable in most contexts

- Which of the following are true about MATLAB variables? - -1. May contain
letters or numbers
2. Must begin with a letter
3. May end with a letter

- The default angular unit in MATLAB is radians unless specified otherwise. -
-True

- An array cannot contain multiple pieces of information. - -False

- Which built-in command would you use if you wanted to generate
uniformly distributed pseudorandom numbers? - -rand( )

- Which built-in command returns the largest number of elements in any
dimension of a variable? - -length( )

- The semi-colon at the end of a line of code is generally an optional piece of
syntax in the MATLAB programming language. - -True

- log(x) - -log base e of x

- log10(x) - -log base 10 of x

- ln(x) - -Not a valid MATLAB command

, - 0 (zero) is the typical computer science representation for true, while 1
(one) is the typical computer science representation for false. - -False

- plot( ) - -Plots y-data points vs. x-data points

- legend( ) - -Creates a legend for a plot

- comet( ) - -Creates an animated plot

- title( ) - -Adds a title to a plot

- figure( ) - -Calls a figure, creating it if necessary

- clf - -Clears the contents of a figure, but does not delete the figure window
entirely

- close - -Used to completely delete one or more figure windows

- axis( ) - -Used to control the axes of a plot

- semilogx( ) - -Plots normal y vs. logarithm of x

- loglog( ) - -Plots logarithm of y vs. logarithm of x

- plot3( ) - -Plots a 3D plot

- surf( ) - -Plots a 3D surface plot

- Consider the array A=[5, 2; −3, 1]. Which of the following is not a valid
approach for allocating this array in MATLAB? Make sure that your allocation
has the same dimensionality as A. - -A = [5; 2 -3; 1]

- MATLAB array indexes must be positive integers. - -True

- Which of the following are characteristics of syntax errors? - -1. The code
is written in such a way that MATLAB does not understand what it is being
asked to do
2. Results in a red error message displaying in the Command Window

- Which of the following is not true about plotting in MATLAB? - -Plotting is
not a useful feature in the MATLAB programming language

- Consider the subplot command: subplot(m,n,p)
In this expression, m represents ___________, n represents ___________, and p
represents ____________ - -1. The number of rows for the entire figure
2. The number of columns for the entire figure

Document information

Uploaded on
February 27, 2025
Number of pages
14
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$14.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
AccurateScores
3.7
(122)
Sold
588
Followers
336
Items
15244
Last sold
3 weeks ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions