Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

this is done on matlab write the code for all problems 0 Lieetrical and Computer

ID: 3886681 • Letter: T

Question




this is done on matlab write the code for all problems

0 Lieetrical and Computer Engineering Tools Homework 3 Due: 9/19/17 by 2:00 PM In this homework problem, and in all subsequent homework problems, you will partition your script m-file into sections. There will be one section per problem. Because Homework 3 has three problems, your script m-file for this homework will contain 3 sections. You shou d submit both a published PDF, as well as your .m file. Your code should contain sufficient comments to explain what your code is doing. 1. The factory you are evaluating has three workers (A, B, and C) and these three workers make the same four products (PI, P2, P3, and P4). The quantity of products P1-P4 made by each worker in an average week is shown in Table 1. The amount of time it takes each worker to make a given product is shown in Table 2. Use these two tables and arithmetic matrix operations in Matlab to solve the following: a) What total quantity of each product are made in an average year? (Assume a 50 week work year) b) How many hours does each worker spend making products in an average week? orker P 2 P3 P4 1225 Table 1: Quantity of a product made by a particular worker in a week.

Explanation / Answer

3) A=[1 0 2;0 3 4;2 1 0]
m=max(max(A)) %max element
B=A.^2 %square every element
C=A*A%Matrix Multiplication with itself

OUTPUT

A =

1 0 2
0 3 4
2 1 0


m =

4


B =

1 0 4
0 9 16
4 1 0


A =

1 0 2
0 3 4
2 1 0


m =

4


B =

1 0 4
0 9 16
4 1 0


C =

5 2 2
8 13 12
2 3 8