You are on page 1of 3

Faculty of Engineering Spring 2017 Mechanical Engineering Department

Matlab Sheet 1

An Overview of MATLAB
1. Using the values x = 10, y = 3. Use MATLAB to compute the following,
and check the results with a calculator.
a. u = x + y b. v = xy c. w = x / y
d. z = sin x e. r = 8 sin y f. s = 5 sin (2y)
2. Suppose that x = 3 and y = 4. Use MATLAB to compute the following,
and check the results with a calculator.
1 −1 3𝑦 4(𝑦−5)
a. (1 − 𝑥 5 ) b. 3𝜋𝑥 2 c. d.
4𝑥−8 3𝑥−6

3. Use MATLAB to calculate


3 45 48.2(55)−93 274 3194⁄5
a. 4 (6)(72 ) + 73 −145 b. c. + + 60(14)−3
53+142 4 5

4. Use MATLAB to calculate


√412 −5.22 3 ln(500)
a. 𝑒 5 −100.53 b. √132 + 8

5. Define the variables a, b, c, and d as:


3𝑎 (𝑎−𝑏)𝑐
𝑎 = 12, 𝑏 = 5.6, 𝑐 = and 𝑑 = , then evaluate
𝑏2 𝑐
𝑑−𝑐
𝑎 𝑑−𝑐 𝑏
a. + 𝑑+𝑐 − (𝑑 − 𝑏)2 b. 𝑒 𝑎−2𝑏 + ln (|𝑐 − 𝑑 + 𝑎|)
𝑏

6. Evaluate the following expressions in MATLAB, for the values x = 5 + 8i,


y= -6 + 7i. Check your answers by hand.
a. u = x + y b. v = xy c. w = x/y
d. z = ex e. r =√𝑦 f. s = xy2
7. Two trigonometric identities are given by:
3 tan 𝑥 − 𝑡𝑎𝑛3 𝑥
a. tan 3𝑥 = b. cos 4𝑥 = 8(𝑐𝑜𝑠 4 𝑥 − 𝑐𝑜𝑠 2 𝑥) + 1
1−3 𝑡𝑎𝑛2 𝑥

For each part, verify that the identity is correct by calculating the values of the
left and right sides of the equation, substituting 𝑥 = 24° .
8. Find the value for the following expressions
𝜋
a. 𝑎𝑟𝑒𝑎 = 4 (𝑑𝑜2 − 𝑑𝑖2 ) , 𝑑𝑜 = 100 mm , 𝑑𝑖 = 40 mm

𝜎𝑥 + 𝜎𝑦 𝜎𝑥 − 𝜎𝑦 2
b. 𝑠𝑡𝑟𝑒𝑠𝑠 = + √( 2
) + 𝜏𝑥𝑦 , 𝜎𝑥 = 100, 𝜎𝑦 = 80, 𝜏𝑥𝑦 = 52 MPa
2 2

Dr./ Ahmed Nagib Elmekawy 1 of 3 Matlab Sheet 1


Faculty of Engineering Spring 2017 Mechanical Engineering Department

9. Find the maximum lateral deflection for the supported shaft shown in figure
(take modulus of elasticity E = 200 GPa, F=14 kN, 𝑙 = 1 m, diameter of shaft d is
20 mm)
𝐹𝑙3 𝜋
Lateral Deflection = , 𝐼 = 64 𝑑 4
3𝐸𝐼

10. A hollow shaft its outer diameter 60 mm , find its inner diameter if the applied
torque acting on the shaft is 450 N.m and allowable shear stress is 220 MPa.
16×𝑇×𝑑𝑜
𝜏𝑎𝑙𝑙 =
𝜋(𝑑𝑜4 − 𝑑𝑖4 )
11. A steel shaft as shown in the figure its diameter 20 mm at A and 40 mm at C , is
subjected to torque T =500 N.m at the free end. Find the factor of safety if the
allowable yield stress in shear 250 MPa, Find also the twist angle (deg) for the
small part of the shaft. Take a shear modulus is 80 GPa , L =350 mm
16𝑇
𝜏𝑎𝑙𝑙 =
𝜋𝑑 3
𝜋 4
𝐽= 𝑑
32
𝑇𝐿𝐵𝐶 𝑇𝐿𝐴𝐵
𝜃 = 𝜃𝐵𝐶 + 𝜃𝐴𝐵 = + (𝑟𝑎𝑑)
𝐺𝐽𝐵𝐶 𝐺𝐽𝐴𝐵

Dr./ Ahmed Nagib Elmekawy 2 of 3 Matlab Sheet 1


Faculty of Engineering Spring 2017 Mechanical Engineering Department

12. Find the stresses acting on the bar shown in figure, F=0.55 kN, P=8 kN and
T=30 N.m and diameter of shaft is 30 mm.

Dr./ Ahmed Nagib Elmekawy 3 of 3 Matlab Sheet 1

You might also like