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 3 out of 16 pages
Exam (elaborations)

MATLAB EXAM 1 QUESTIONS AND ANSWERS

Document preview thumbnail
Preview 3 out of 16 pages

MATLAB EXAM 1 QUESTIONS AND ANSWERS

Content preview

MATLAB EXAM 1 QUESTIONS AND ANSWERS

1. What would be the result of the following 1 (logical)
expres- sions?
'q' >= 'D' - 1

2. What would be the result of the following 0 (logical)
expres- sions?
5 ==5+ 2

3. What would be the result of the following 3
expres- sions?
(5==5) + 2

4. What would be the result of the following 1 (logical)
expres- sions?
xor(5< 17, 10 > 11)

5. What would be the result of the following 0 (logical)
expres- sions?
10>6>4

6. What would be the result of the following 1 (logical)
expres- sions?
1<10<=2

7. 2\12+12/2-3^2 3

8. Generate a 5 x 4 matrix of integers, each
random real numbers, each in in the inclusive
the range (0,25) range from 15
to 42
9. Generate a 5 x 4 matrix of random real
numbers, each in the range (6,30)

10. Generate a 5 x 4 matrix of random
1/
16

, MATLAB EXAM 1 QUESTIONS AND ANSWERS

rand(5,4)*25


rand(5,4)*(30-6)+6


randi([15 42],5,4)




2/
16

, MATLAB EXAM 1 QUESTIONS AND ANSWERS


11. Generate a 4 x 4 matrix of random randi([-10 5],4)
integers, each in the inclusive range from -
10 to 5

12. Generate a (2×5)matrix with all 80s ones(2,5)*80

13. Delete the last column in a matrix mat(:,end)=[]

14. Using the colon operator and 12 10 8 6
also the linspace function, create the following
vec- tor:
-1 1 3 5 7 9 11

15. Using the colon operator
and also
the linspace function, create the following
vector: 8 5 2-1-4

16. Create a variable pounds to store a
weight in pounds. Convert this to kilogram
and assign the result to a variable kilos

17. Find an
efficient way
to generate the following
matrix mat=
7 8 9 10
12 10 8 6

18. refer to the element in the second row,
third col- umn of
mat=
7 8 9 10
3/
16

Document information

Uploaded on
October 3, 2025
Number of pages
16
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

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.
millyphilip
3.6
(555)
Sold
2960
Followers
1963
Items
45877
Last sold
1 day 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