Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the code in MATLAB. Much appreciated. Part II 1. Please perform the following operations with the matrices below: 15 3 61 13 2

image text in transcribed

Please write the code in MATLAB. Much appreciated.

Part II 1. Please perform the following operations with the matrices below: 15 3 61 13 2 51 * = [1,2,5), y = 11 4 0 ,z= 4 7 8 13 891 (a) Sort z such that the first column is sorted in ascending order with each row retaining its original values, i.e., row [5, 3, 6] may move around, but once sorted, it should still retain the values [5, 3, 6). Store the result back into z. Hint: Use "sortrows". (25 pts, 5 for each part) (b) Multiple column 2 of y by 3 and add the result to column 3 of y. Column 1 should remain unchanged. Only column 3 should change. (c) Multiply the corresponding elements of row 1 and row 3 of z, and place the result in row 2. replacing the previous values. Row I and 3 should remain unchanged. Only row 2 should change. (d) Extract the diagonal of z, take its transpose, multiply its values with the corresponding elements of x, then set the diagonal of z equal to this result. Only the diagonal of z should change. The values of x should remain unchanged. (e) Create the following matrix: [x'y'z'] 2. A tree trunk has a cylinder shape. The radius of circular area is 20cm and the length is 1.5m. A piece is cut off, whose angle points to the circle center and remains homogeneous at 60 degrees throughout the piece. Its length is Im. What is the surface area of the residual tree trunk after removing the cut-off piece? (25 pts, 5, 8, 12) The cut-off piece 60 degree Apply the problem-solving framework from Lecture 2 Part 3 to solve the problem below. Complete all steps parts (a) through (c). Make sure that your code run successfully before submission. (a) Concisely describe the input and output and their units. (b) Derive the algorithm, i.e., describe your approach to solving this problem and any equations that needed to be derived. (c) Implement your solution in a MATLAB script and comment your code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

DEFINE HRIS and describe its main components.

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago