Ask Other Engineering Expert

- All work is to be submitted as a SINGLE pdf document report. Your document should contain all the MATLAB script (including comments), the solutions generate by MATLAB, and graphs that you were asked to produce. You MUST use print screen method to show the MATLAB solution.

- Your code must be clear and simplify

- Use the template provided

- Each M-file must start include your name, student ID, and Question No.

- For the analytical, you may write your solution in A4 paper and scan it. Then, insert as picture into word document. OR you may type your solution in the word document.

- Name your file: yourname - Assign 2

- All your work must be presented in neat and tidy manner.

- Marks will be given according to the quality of documentation.

- You MUST submit your assignment electronically through moodle under Assignment 2 section.

- Late submission will be penalized (10% per day).

- Answer all the questions

- Good luck

Section A

Question 1

Write a MATLAB script that calculates the cost of shipping a package according to the following price schedule.

Type of service

Weight

0 - 0.5 lb

0.5 - 5 lb

More than 5 lb

Ground

(5 - 7 Days)

 

$0.70 + $0.06/oz

$1.18 + $0.42 for every additional

0.5 lb (or fraction)

$4.96 + $0.72 for every additional 0.5 lb (or fraction)

Express

(3 - 4 Days)

 

$2.40 + $0.25/oz

$4.40 + $1.20 for every additional

0.5 lb (or fraction)

$15.20 + $1.80 for every additional 0.5 lb (or fraction)

Overnight (One Day)

 

$12.20 + $0.80/oz

$18.60 + $4.80 for every additional

0.5 lb (or fraction)

$61.80 + $6.40 for every additional 0.5 lb (or fraction)

The program asks the user to enter the type of service (Ground, Express, or Overnight) and the weight of the package (two number. the first number for pounds and the second number for ounces). The program then displays the cost for the shipment. Run the program for continuous for three times to calculate following cases:

(a) Ground 3 lb 8 oz

(b) Express 0 lb 6 oz

(c) Overnight 6 lb 11 oz

Given that: 1 lb = 16 oz

Question 2

The handicap differential (HCP) for a round of golf is calculated from the formula:

HCP = ((Score - Course Rating)/course Slope ) x113

The course rating and the slope are measures of how difficult a particular course is. A golfers handicap is calculated from a certain number N of their best (lowest) handicap scores according to the Table 1.

For example, if 13 rounds have been played, only the best five handicaps are used. A handicap cannot be computed for the fewer than five rounds. If more than 20 rounds have been played, only the 20 most recent results are used.

Once the lowest N handicap differentials have been identified, they are averaged and then rounded down to the nearest tenth. The result is player's handicap.

(a) Write a MATLAB program in a script file that calculates a person's handicap. The program asks the user to enter the golfers record in a three columns matrix where the first column is the course rating, the column is the course slope, and the third is the player's score. Each row corresponds to one round. The program displays the person's handicap, the number of rounds have been played and the three column matrix.

Write a report to explain the method you are using.

(b) Execute the program for the players with the following records

(i)

Rating

Slope

Score

72.2

119

71

71.6

122

73

74.0

139

78

68.2

125

69

70.2

130

74

69.6

109

69

66.6

111

74

(ii)

Rating

Slope

Score

71.6

122

85

72.8

118

87

69.7

103

83

70.3

115

81

70.9

116

79

72.3

117

91

71.6

122

89

70.3

115

83

72.8

118

92

70.9

109

80

73.1

132

94

68.2

115

78

74.2

135

103

71.9

121

84

72.2

119

71

71.6

122

73

74.0

139

78

68.2

125

69

70.2

130

74

69.6

109

69

66.6

111

74

71.4

107

72

Question 3

A railway wagon, moving with velocity v, strikes a viscously damped buffer. The equation of motion is given by:

m - dv/dt = -cv

Where v(t) is the velocity of the wagon at time t. Assume that the values of the mass m, damping c, and initial velocity v(0) as m = 5000 kg, c = 15000 Ns/m, and v(0) = 3 m/s

(a) Write a MATLAB code to calculate the velocity of the wagon at t = 2 second by using 4th order Runge-Kutta method, Euler Explicit and Euler Implicit. All plots must be plotted in the same figure. Start with the step size of 1. Your code must show the velocity with respective time for all three methods in the command window.

(b) Repeat your calculation in (a) with another two step sizes, i.e., 0.5 and 0.1. Discuss your solutions.

Section B

Question 1

Each of the two tanks shown in Figure 1 contain 100 gallons of water. The water in tank 1 contains 1000 grams of dissolved salt, while the water in tank 2 contains 100 grams of dissolved salt. At time t = 0, pipe 1 starts pumping pure water at the rate of 10 gallons/minute, while pipes 2, 3, and 4 start pumping mixed water at rates 15, 5, and 10 gallons/minute, respectively, in the directions indicated in Figure 1. The concentration of the tanks 1 and 2 are represent by the following differential equations:

dx/dt = 5/100y - 15/100x

dy/dt = 15/100x - 15/100y

where x(0) = 1000, y(0) = 100, x(t) is the amount of salt in tank 1 at time t, and y(t) is the amount of salt in tank 2 at time t

1275_Figure 1.jpg

Figure 1 - Two connected tanks with dissolved salt

(a) Apply 4th order Runge-Kutta (RK) method to find the concentration of the salt in the tanks at t = 3 mins with the step size of 1 (solve manually).

(b) Write a MATLAB code to find the concentration of the salt in the tanks at t = 50 mins with the step size of 1. List out all the RK solutions and plot the graph.

(c) Using the code in part (b), find the time (in 2 decimal places) when the concentration of both tanks are same by showing it in the graph.

(d) Using the same code in part (b), find the time (in 2 decimal places) when the concentration of both tanks is below 2. Display clearly your solution in the graph.

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M91981339

Have any Question?


Related Questions in Other Engineering

Register design a cpu register is simply a row of

Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required. For example, an 8 bit register has 8 flip-flops side by side for stor ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

Mine safety amp environmental engineering assignment -part

Mine Safety & Environmental Engineering Assignment - Part 1 - Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the fo ...

Projectflow processing of liquor in a mineral refining

Project Flow Processing of Liquor in a Mineral Refining Plant The aim of this project is to design a flow processing system of liquor (slurry) in a mineral (aluminum) refining plant. Aluminum is manufactured in two phase ...

Learning outcomes evaluate multiuser communication and

Learning Outcomes Evaluate multiuser communication and resource sharing techniques; Apply the techniques of, and report on, digital communication applications using Matlab and hardware devices. Assignment Description The ...

Operations engineering assignment -please select only one

Operations Engineering Assignment - Please select only one of the following case studies for your assignment: CASE A. Tesla Motors Tesla is an innovative manufacturer that designs, assemble and sells fully electric vehic ...

Select a risk problem from the list below and prepare a

Select a risk problem from the list below and prepare a risk management plan in accordance with AS/NZS ISO 31000:2009. Please ensure that: - Establish the context clearly, in accordance with the Standard; - Define your s ...

Engineering materials term paper assignment -conduct a

ENGINEERING MATERIALS TERM PAPER ASSIGNMENT - Conduct a thorough literature search and write a 15-20 page technical review paper on the evolution of the engineering materials used in the manufacturing of any one of the f ...

Task 1using the lab kit design a circuit for the processor

Task 1: Using the lab kit, design a circuit for the processor to control the output of a connected 7-segment LED display device. You will be provided with a standard common anode 7-segment display of the type FND-507 (or ...

Control theory - lab reportsfor experiments 1 to 4 you must

Control Theory - Lab Reports For experiments 1 to 4 you must undertake the following: a) At the start of each section (including the pre-lab activities) there are a number learning outcomes. That is, what students should ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As