Practice Problems (3) 1. Let x = [2 5 1 6]. a) Add 16 to each element. b) Add 3 to just the odd-index elements. c) Compute the square root of each element.
Practice Problems (3) 1. Let x = [2 5 1 6]. a) Add 16 to each element. b) Add 3 to just the odd-index elements. c) Compute the square root of each element.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Practice Problems (3)
1. Let x = [2 5 1 6].
a) Add 16 to each element.
b) Add 3 to just the odd-index elements.
c) Compute the square root of each element.
d) Compute the square of each element.
2. Let x = [3 2 6 8] and y = [4 135]
a) Add the elements in x to y.
b) Raise each element of x to the power specified by the corresponding element
in y.
c) Divide each element of y by the corresponding element in x
d) Multiply each element in x by the corresponding element in y, calling the
result "z".
3. When A and B contain the values shown below, give the values of C vector after
executing the following statements.
A = [2-150]; B = [3 2 -14]
a) C = A-B
b) C = B + A-3
c) C = B./A
d) C = A.^B
e) C = 2.^B+A
f) C = 2*A+A.^B
4. Use the linspace commands to create 4 vectors a, b, c, d with the elements:
a) 2, 4, 6, 8... to 10 elements
b) 10, 8, 6, 4, 2, 0, -2, -4...to 15 elements
c) 1, 1/2, 1/3, 1/4, 1/5... to 10 elements
d) 0, 1/2, 2/3, 3/4, 4/5... to 10 elements
5. Compute the average molecular weight of a mixture of equal fractions of CH4,
H2,
O2, CO, CO2, H2O, CH3OH, C2H6.
The average molecular weight: Mw Σ Mw₁ X X₁
-
average
i=1](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ffb3cbe07-d059-4735-bc0c-42b09d1ccd4b%2Fa41a4b89-448f-495f-a3e7-0900c93a1bfe%2F77zzar_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Practice Problems (3)
1. Let x = [2 5 1 6].
a) Add 16 to each element.
b) Add 3 to just the odd-index elements.
c) Compute the square root of each element.
d) Compute the square of each element.
2. Let x = [3 2 6 8] and y = [4 135]
a) Add the elements in x to y.
b) Raise each element of x to the power specified by the corresponding element
in y.
c) Divide each element of y by the corresponding element in x
d) Multiply each element in x by the corresponding element in y, calling the
result "z".
3. When A and B contain the values shown below, give the values of C vector after
executing the following statements.
A = [2-150]; B = [3 2 -14]
a) C = A-B
b) C = B + A-3
c) C = B./A
d) C = A.^B
e) C = 2.^B+A
f) C = 2*A+A.^B
4. Use the linspace commands to create 4 vectors a, b, c, d with the elements:
a) 2, 4, 6, 8... to 10 elements
b) 10, 8, 6, 4, 2, 0, -2, -4...to 15 elements
c) 1, 1/2, 1/3, 1/4, 1/5... to 10 elements
d) 0, 1/2, 2/3, 3/4, 4/5... to 10 elements
5. Compute the average molecular weight of a mixture of equal fractions of CH4,
H2,
O2, CO, CO2, H2O, CH3OH, C2H6.
The average molecular weight: Mw Σ Mw₁ X X₁
-
average
i=1
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY