Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

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

Question 1 define rock mechanics discuss the main

Question 1 . Define rock mechanics. Discuss the main objectives of the application of rock mechanics in mining. Question 2. Define stress. Draw a diagram and define the normal and shear stress by resolving the resultant ...

Assignment -problem 1 - given is the lcc difference

Assignment - Problem 1 - Given is the LCC difference equation that represents some LTI system: y(n) - ¾y(n-1) - ¼y(n-2) = x(n) + x(n-1)   a) Find the impulse response of the system (solve the LCCDE). b) Draw a block diag ...

1 online discussion forum - post your proposed topic and

1. Online Discussion forum - Post your proposed topic and chosen data set as well as a short plan for the project. This is required for approval of the topic. As discussed, students must select unique topics, therefore i ...

Projection of planes1 a regular pentagon of 25 mm side has

Projection of Planes 1. A regular pentagon of 25 mm side has one side on the ground. Its plane is inclined at 45° to H.P. and perpendicular to the V.P. Draw its projections. 2. Draw the projection of a circle of 50 mm di ...

Load fault level analysis amp protection design of a remote

LOAD, FAULT LEVEL ANALYSIS & PROTECTION DESIGN OF A REMOTE AREA MICROGRID Assignment Please undertake the following analyses: 1. Calculate the 3-phase fault levels on Bus 2, Bus 3 and Bus 4 with the main supply connected ...

Engineering analysis homework -for every problem provide

Engineering Analysis Homework - For every problem, provide The MATLAB script/function files that solve the problems. Problem 1: Write a script that solves the problem. For (c), show results of the evaluation of every ind ...

Mine safety amp environmental engineeringpart 1 questions1

Mine Safety & Environmental Engineering 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 following terms ...

Assessment practical reportproduce a short technical report

Assessment: Practical Report Produce a short technical report in a form consistent with proteomic journals covering the techniques, results and interpretation of your proteomics experiment in the practical classes. The r ...

Q 1a discontinuity is found fully developed from the toe to

Q. 1 A discontinuity is found fully developed from the toe to the bench surface on a 15 m high slope, slope angle 65°. The discontinuity (frictional angle 32° and cohesion 20 kN/m2) is planar and its strike is parallel t ...

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 ...

  • 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