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 10 pages
Exam (elaborations)

EGR 101 MATLAB Exam with all Correct & 100% Verified Answers |Actual Complete Exam |Already Graded A+

Document preview thumbnail
Preview 2 out of 10 pages

EGR 101 MATLAB Exam with all Correct & 100% Verified Answers |Actual Complete Exam |Already Graded A+

Content preview

EGR 101 MATLAB Exam with all Correct & 100%
Verified Answers |Actual Complete Exam |Already
Graded A+

True/False: Arrays in MATLAB can only be one dimensional. ✔Correct Answer-False

You want to create an array
(stored in x) that starts at 1 and ends at 40 with 100 data points. What line of code would you use?
✔Correct Answer-x = linspace(1, 40, 100)

You want to create the following array:



x=[2 4 6 8 10 12 14 16]



What line of code would you use? ✔Correct Answer-x=[2:2:16]

What command would you use to return the 5th element in the following array?

array = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]; ✔Correct Answer-array(5)

Given the following code:

x=[-15 20 -13 -19 3 16 7 -13 -5 -2];

z=x(6);



What is stored in z? ✔Correct Answer-16

Given the following code:

x=[ 20 -14 15 6 -5 -13 -3 -1 -16 4];

z=x(2);



What is stored in z? ✔Correct Answer--14

Given the following code:

x=[ -11 -5 3 -10 -9 5 -10 13 20 9];

, [Y, K]=min(x)



What is stored in Y? ✔Correct Answer--11

Given the following code:

x=[ -11 -5 3 -10 -9 5 -10 13 20 9];

[Y, K]=max(x)



What is stored in K? ✔Correct Answer-9

True/False: Linspace is most useful for creating arrays when you want to control the number of data
points generated. ✔Correct Answer-True

True/False: All conditional statements must use the word "end" to complete the statement.
✔Correct Answer-True

Given the following lines of code, what value is stored in the variable z?

x = 3;

y = 4;

z = 5;

if (y > x)

z = z + 1;

else

z = z - 1;

end ✔Correct Answer-6

Given the following lines of code, what value is stored in the variable z?

x = 3;

y = 4;

z = 5;

if (2*x < y)

z = z + 1;

Document information

Uploaded on
March 14, 2026
Number of pages
10
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$16.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.
Studyclub
3.6
(14)
Sold
60
Followers
1
Items
12380
Last sold
1 week 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