Sale!

Introduction to Engineering Analysis Assignment 2

$30.00

Category:
Rate this product

ENSC 180: Introduction to Engineering Analysis
Assignment 2

Note: MATLAB codes should include definition of all variables; headings to identify
the program structure plan; and appropriate captions and labels for tables and
figures. M-files together with your input/output for each problem should be submitted.
Marks will be deducted for solutions that are unrealistic/impractical (as future
engineers students should learn to think practically) and poorly documented.
1. A solid sphere of radius r and density ρs is placed in a fluid of density ρ0. The
sphere sinks to a depth of h. The volume of sphere below the fluid surface is
πœ‹πœ‹(3π‘Ÿπ‘Ÿβ„Ž2βˆ’β„Ž3)
3 . Develop a MATLAB function to calculate h based on input values r, ρs
and ρ0. Your function should prompt a user to input r, ρs and ρ0 and print the
output as β€˜The sphere depth below the fluid surface is:’. Test your code with
r=40mm, ρs =0.6 g/mm3 and ρ0 =1.0 g/mm3
. Next, develop a function that
calculates the ratio h/r for a given (ρs/ρ0) ratio. Plot the graph of h/r vs. (ρs/ρ0).
Discuss the results using your knowledge of engineering and Physics. (25 marks)
2. The height of a rocket is approximated by the following equation.
H = 2.13t
2 – 0.0013t
4 + 0.000034t
4.751
where H is the height (meters) and t is the time (seconds).
a) Create a function, R_motion to calculate the rocket height and speed at a given
time; and b) create a function handle to R_motion. C) plot the rocket height and
velocity with time using a function named R_motionplot. (25 marks)
3. Legendre and Chebyshev polynomials are a class of orthogonal polynomials used
in the solution of engineering problems, especially in numerical integration.
Consider the Legendre polynomial (693×6
-945×4
+315×2
-15)/48 and the Chebyshev
polynomial (32×6
-48×4
+18×2
-1). Find the roots of these polynomials in the range
-1.0 ≀x≀ 1.0 to an accuracy of 0.001. Comment on the behaviour of roots. (25 marks)
4. Fourier transforms are widely used in signal processing, control theory, earthquake
engineering and other engineering applications. It involves representing an
arbitrary periodic function by a trigonometric series. Consider a periodic function
of the following form:
𝑓𝑓(π‘₯π‘₯) = βˆ’π‘˜π‘˜ π‘€π‘€β„Žπ‘’π‘’π‘’π‘’ βˆ’ πœ‹πœ‹ < π‘₯π‘₯ < 0
π‘˜π‘˜ π‘€π‘€β„Žπ‘’π‘’π‘’π‘’ 0 < π‘₯π‘₯ < πœ‹πœ‹
π‘Žπ‘Žπ‘Žπ‘Žπ‘Žπ‘Ž 𝑓𝑓(π‘₯π‘₯ + 2πœ‹πœ‹) = 𝑓𝑓(π‘₯π‘₯)
The above function is approximated using the Fourier series,
βˆ‘ 𝑏𝑏𝑛𝑛
∝
𝑛𝑛=1 sin(𝑛𝑛𝑛𝑛) π‘€π‘€β„Žπ‘’π‘’π‘’π‘’π‘’π‘’ 𝑏𝑏𝑛𝑛 = 2π‘˜π‘˜(1βˆ’π‘π‘π‘π‘π‘π‘π‘π‘π‘π‘)
𝑛𝑛𝑛𝑛 . Write a MATLAB code to approximate
f(x) using the above series and determine an appropriate value (i.e. N) for the upper
limit of the series expansion. Comment on the behavior of each term of the series
and the solution for f(x) by using different values for N. Use k=1 in your numerical
trials. (25 marks)

Open chat
Need help?
Hello
Can we help you?