ISE212Engineering Computing: MATLAB Spring_2013

Homework #1 Due: Monday 2/18/2013

Upload your assignments to the TA by going to Content in Blackboard:

1. Write an executable script file (m-file) that takes no input and returns a vector solving the following system of equations using matrix operations. (Determine the values of s, u, p, and w). Also, include the inverse of the left-hand coefficient 4x4 matrix. Use plenty of comments to annotate your code and include your name in the m-file.

(Name your m-file> solutions13.m).

5s + 7u + 20p + 26w = 25

20s+26u + 25p + 36w = 65

10s + 6u + 2p + 8w = 84

14s + 8u + 5p + 9w =190

Ans=

2. Manufacturing Cost Analysis:

The table below shows the hourly cost of four types of manufacturing processes. It also shows the number of hours required of each process to produce three different products. Use matrices and MATLAB to solve the following:

> Determine the cost of each process to produce one unit of product#1.

> Determine the cost to make one unit of each product.

> Suppose you produce 10 units of product#1, 9 units of product#2, and 7 units of

Product#3. Provide the total cost for this scenario.

Write an executable script file (m-file) that takes no inputs to return your solutions.

(Name your m-file: mca13.m).

Table: Cost and Time Data for Manufacturing Process

Hours Required to Produce One Unit

ProcessHourly Cost $Product#1Product#2Product#3

Lathe20 7 5 2

Grinding19 2 3 .5

Milling19 4 2 3

Welding27 5 1 2

Ans=

3. Write an executable script file (m-file) that takes no input and creates a table of temperatures in Celsius and the respective conversion in Fahrenheit for -10°C to 100°C with 5°C intervals. (Note: display each temperature with two decimal digits). (Name your m-file > CtoF13.m).

Ans=

4. The force required to compress a linear spring is given by the equation: F = kx where Fis the force in newtons and k is the spring constant in newtons per meter. The potential energy stored in the compressed spring is given by the equation: E = kx2/2 where E is the energy in joules. (See figure below).

Write an executable script file (m-file) that takes no inputs and returns the displacement and stored energy of a spring system after prompting the user for the 1) input forces (in N) on the spring and 2) the spring constant (in N/m).Use plenty of comments to annotate your code and include your name in the m-file.

(Name your m-file> energy13.m).

Ans=

5.A Watson engineering student has just has decided to spend $2,200 on a new home theater system. He took out a six-month loan with a “nominal” yearly rate of 9% (but really3/4% per month). If this student wants to pay the same amount every month, how much will he have to pay? Write an executable script file (m-file) that takes no input and calculates this amount. Also, display a table with the interest accrued, payment on the principal amount, and ending balance for each month with proper numerical formatting (i.e. no scientific notation). (Name your m-file> Bill13.m).

The following formula is used to calculate the fixed monthly payment (A) required to fully amortize a loanof P dollars over a term of n months at a monthly interest rate of i. [If the quoted rate is 6%, for example, i is .06/12 or 0.005].

A = P[i(1 + i)n]/[(1 + i)n - 1]

6. Write an executable script file (m-file) that takes no input and solves the following problem. In a shipping facility, there is a robot that slides boxes across a table with a force of 10N to their next destination. When the force acts on box1 the resulting acceleration is 4.0 m/s2. When the same force acts on box 2 the resulting acceleration is 6.4 m/s2. Find the mass of box 1 and box 2. What is the acceleration a3 for the same force acting on the combination of box 1 and box 2?

(Name your m-file> Force13.m).

Hint: Newtons Law

THE END