Matlab Sheet 2. Arrays

Similar documents
Matlab Sheet 2. Arrays

Stress Analysis Lecture 3 ME 276 Spring Dr./ Ahmed Mohamed Nagib Elmekawy

ENT345 Mechanical Components Design

SOLUTION (17.3) Known: A simply supported steel shaft is connected to an electric motor with a flexible coupling.

Revision Term 2. Prof Ahmed Kovacevic

D : SOLID MECHANICS. Q. 1 Q. 9 carry one mark each.

Helical Gears n A Textbook of Machine Design

CHAPTER 17 FLEXIBLE MECHANICAL ELEMENTS LECTURE NOTES DR. HAFTIRMAN

CLUTCHES AND BRAKES. Square-jaw clutch

IDE 110 Mechanics of Materials Spring 2006 Final Examination FOR GRADING ONLY

EMA 3702 Mechanics & Materials Science (Mechanics of Materials) Chapter 3 Torsion

WORCESTER POLYTECHNIC INSTITUTE

STATICS. Friction VECTOR MECHANICS FOR ENGINEERS: Eighth Edition CHAPTER. Ferdinand P. Beer E. Russell Johnston, Jr.

Engineering Mechanics: Statics

Torsion of shafts with circular symmetry

MAAE 2202 A. Come to the PASS workshop with your mock exam complete. During the workshop you can work with other students to review your work.

Engineering Mechanics: Statics

Module 2 Stresses in machine elements. Version 2 ME, IIT Kharagpur

STRESS. Bar. ! Stress. ! Average Normal Stress in an Axially Loaded. ! Average Shear Stress. ! Allowable Stress. ! Design of Simple Connections

Stress Analysis Lecture 4 ME 276 Spring Dr./ Ahmed Mohamed Nagib Elmekawy

Tuesday, February 11, Chapter 3. Load and Stress Analysis. Dr. Mohammad Suliman Abuhaiba, PE

The University of Melbourne Engineering Mechanics

CIVL222 STRENGTH OF MATERIALS. Chapter 6. Torsion

If the solution does not follow a logical thought process, it will be assumed in error.

Code No: R Set No. 1

EDEXCEL NATIONAL CERTIFICATE/DIPLOMA FURTHER MECHANICAL PRINCIPLES AND APPLICATIONS UNIT 11 - NQF LEVEL 3 OUTCOME 4 - LIFTING MACHINES

3.5 STRESS AND STRAIN IN PURE SHEAR. The next element is in a state of pure shear.

MEMS Project 2 Assignment. Design of a Shaft to Transmit Torque Between Two Pulleys

Eng Sample Test 4

REE Internal Fluid Flow Sheet 2 - Solution Fundamentals of Fluid Mechanics

CHAPTER 8 SCREWS, FASTENERS, NONPERMANENT JOINTS

Mechanics of Materials II. Chapter III. A review of the fundamental formulation of stress, strain, and deflection

MECHANICS OF MATERIALS Design of a Transmission Shaft

(48) CHAPTER 3: TORSION

Aluminum shell. Brass core. 40 in

[7] Torsion. [7.1] Torsion. [7.2] Statically Indeterminate Torsion. [7] Torsion Page 1 of 21

Overview. Dry Friction Wedges Flatbelts Screws Bearings Rolling Resistance

2014 MECHANICS OF MATERIALS

When a rigid body is in equilibrium, both the resultant force and the resultant couple must be zero.

ME Final Exam. PROBLEM NO. 4 Part A (2 points max.) M (x) y. z (neutral axis) beam cross-sec+on. 20 kip ft. 0.2 ft. 10 ft. 0.1 ft.

1. What would be the value of F1 to balance the system if F2=20N? 20cm T =? 20kg

Statics Chapter II Fall 2018 Exercises Corresponding to Sections 2.1, 2.2, and 2.3

Q. 1 Q. 5 carry one mark each.

PES Institute of Technology

UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE BENG(HONS) MECHANICAL ENGINEERING SEMESTER TWO EXAMINATION 2016/2017 ENGINEERING PRINCIPLES 2

Downloaded from Downloaded from / 1

D : SOLID MECHANICS. Q. 1 Q. 9 carry one mark each. Q.1 Find the force (in kn) in the member BH of the truss shown.

Chapter 8 Structural Design and Analysis. Strength and stiffness 5 types of load: Tension Compression Shear Bending Torsion

MECHANICS OF MATERIALS

QUESTION BANK SEMESTER: III SUBJECT NAME: MECHANICS OF SOLIDS

SECOND ENGINEER REG. III/2 APPLIED MECHANICS

Machine DESIGN II. Lecture 3. Brakes

R13. II B. Tech I Semester Regular Examinations, Jan MECHANICS OF SOLIDS (Com. to ME, AME, AE, MTE) PART-A

Arberi Ferraj. Wentworth Institute of Technology. Design of Machine Elements MECH 420

11.1 Virtual Work Procedures and Strategies, page 1 of 2

ASSOCIATE DEGREE IN ENGINEERING EXAMINATIONS. SEMESTER 2 May 2013

ME325 EXAM I (Sample)

ENGR 1100 Introduction to Mechanical Engineering

The problem of transmitting a torque or rotary motion from one plane to another is frequently encountered in machine design.

Shafts Introduction. Shafts 509

CHAPTER 2 Failure/Fracture Criterion

Design against fluctuating load

SOLUTION 8 7. To hold lever: a+ M O = 0; F B (0.15) - 5 = 0; F B = N. Require = N N B = N 0.3. Lever,

MECHANICS OF MATERIALS

SOLUTION 8 1. a+ M B = 0; N A = 0. N A = kn = 16.5 kn. Ans. + c F y = 0; N B = 0

2. Polar moment of inertia As stated above, the polar second moment of area, J is defined as. Sample copy

Mechanical Design. Design of Shaft

Static Failure (pg 206)

Mechatronics. MANE 4490 Fall 2002 Assignment # 1

8.1 Internal Forces in Structural Members

Mechanical Engineering Ph.D. Preliminary Qualifying Examination Solid Mechanics February 25, 2002

h p://edugen.wileyplus.com/edugen/courses/crs1404/pc/b02/c2hlch...

MARKS DISTRIBUTION AS PER CHAPTER (QUESTION ASKED IN GTU EXAM) Name Of Chapter. Applications of. Friction. Centroid & Moment.

PDDC 1 st Semester Civil Engineering Department Assignments of Mechanics of Solids [ ] Introduction, Fundamentals of Statics

Only for Reference Page 1 of 18

Chapter 5 Torsion STRUCTURAL MECHANICS: CE203. Notes are based on Mechanics of Materials: by R. C. Hibbeler, 7th Edition, Pearson

MECE 3321 MECHANICS OF SOLIDS CHAPTER 1

Solutions to Problems in Chapter Two

SRI CHANDRASEKHARENDRA SARASWATHI VISWA MAHAVIDHYALAYA

Dynamics Plane kinematics of rigid bodies Section 4: TJW Rotation: Example 1

COLUMNS: BUCKLING (DIFFERENT ENDS)

2. Rigid bar ABC supports a weight of W = 50 kn. Bar ABC is pinned at A and supported at B by rod (1). What is the axial force in rod (1)?

PERIYAR CENTENARY POLYTECHNIC COLLEGE PERIYAR NAGAR - VALLAM THANJAVUR. DEPARTMENT OF MECHANICAL ENGINEERING QUESTION BANK

Matlab Sheet 4. Conditional Statements and Loops

Improvement in the Design & Manufacturing of Twin Worm Self Locking Technique and applications

UNIT-I STRESS, STRAIN. 1. A Member A B C D is subjected to loading as shown in fig determine the total elongation. Take E= 2 x10 5 N/mm 2

Exam 04: Chapters 08 and 09

Shafts. Fig.(4.1) Dr. Salah Gasim Ahmed YIC 1

MECH 401 Mechanical Design Applications

Determine the resultant internal loadings acting on the cross section at C of the beam shown in Fig. 1 4a.

Samantha Ramirez, MSE. Stress. The intensity of the internal force acting on a specific plane (area) passing through a point. F 2

Design and Analysis of Adjustable Inside Diameter Mandrel for Induction Pipe Bender

Members Subjected to Torsional Loads

Question 1. Ignore bottom surface. Solution: Design variables: X = (R, H) Objective function: maximize volume, πr 2 H OR Minimize, f(x) = πr 2 H

: APPLIED MECHANICS & STRENGTH OF MATERIALS COURSE CODE : 4021 COURSE CATEGORY : A PERIODS/ WEEK : 5 PERIODS/ SEMESTER : 75 CREDIT : 5 TIME SCHEDULE

COURSE TITLE : APPLIED MECHANICS & STRENGTH OF MATERIALS COURSE CODE : 4017 COURSE CATEGORY : A PERIODS/WEEK : 6 PERIODS/ SEMESTER : 108 CREDITS : 5

(35+70) 35 g (m 1+m 2)a=m1g a = 35 a= =3.27 g 105

Questions from all units

MECHANICAL ENGINEERING» COURSE:

Engineering Mechanics. Friction in Action

Transcription:

Matlab Sheet 2 Arrays 1. a. Create the vector x having 50 logarithmically spaced values starting at 10 and ending at 1000. b. Create the vector x having 20 logarithmically spaced values starting at 10 and ending at 1000. 2. Create a row vector that has the following elements: 8, 10/4, 12 1.4, 51, tan 85, 26, and 0.15. 3. Create a row vector in which the first element is 1 and the last element is 43, with an increment of 6 between the elements (1, 7, 13,, 43). 4. Use a single command to create a row vector (assign it to a variable named b) with 11 elements, such that b = 0 2 4 6 8 10 12 9 6 3 0 Do not type the vector explicitly. 5. Create two row vectors: a=2:3:17 and b=3:4:15. Then, by only using the name of the vectors (a and b), create a row vector c that is made from the elements of a followed by the elements of b. 6. Create two column vectors: a=[2:3:17] and b=[3:4:15]. Then, by only using the name of the vectors (a and b), create a column vector c that is made from the elements of a followed by the elements of b. 7. A Type this matrix in MATLAB and use MATLAB to carry out the following Instructions: 3 7 4 12 A = [ 5 9 10 2 ] 6 13 8 11 15 5 4 1 a. Create a vector v consisting of the elements in the second column of A. b. Create a vector w consisting of the elements in the second row of A. Dr./ Ahmed Nagib Elmekawy 1 of 11 Matlab Sheet 2

8. Create the following matrix by using vector notation for creating vectors with constant spacing and/or the linspace command. Do not type individual elements explicitly. 9. Create the following matrix by typing one command. Do not type individual elements explicitly. 10. Create the following matrix by typing one command. Do not type individual elements explicitly. 11. Create the following matrix by typing one command. Do not type individual elements explicitly. 12. Compute the length and absolute value of the following vectors: a. x = [2 4 7] b. y = [2 4 7] c. x = [5 + 3i 3 + 4i 2 7i] 13. Given the matrix 3 7 4 12 A = [ 5 9 10 2 ] 6 13 8 11 15 5 4 1 Dr./ Ahmed Nagib Elmekawy 2 of 11 Matlab Sheet 2

a. Find the maximum and minimum values in each column. b. Find the maximum and minimum values in each row. 14. Given the matrix 3 7 4 12 A = [ 5 9 10 2 ] 6 13 8 11 15 5 4 1 a. Sort each column and store the result in an array B. b. Sort each row and store the result in an array C. c. Add each column and store the result in an array D. d. Add each row and store the result in an array E. 15. Consider the following arrays. A = [ 1 4 2 2 4 100 ] B = ln A 7 9 7 3 π 42 Write MATLAB expressions to do the following. a. Select just the second row of B. b. Evaluate the sum of the second row of B. c. Multiply the second column of B and the first column of A element by element. d. Evaluate the maximum value in the vector resulting from element-by element multiplication of the second column of B with the first column of A. e. Use element-by-element division to divide the first row of A by the first three elements of the third column of B. Evaluate the sum of the elements of the resulting vector. 16. By hand (pencil and paper) write what will be displayed if the following commands are executed by MATLAB. Check your answers by executing the commands with MATLAB. (Parts (b), (c), (d), and (e) use the vector that was defined in part (a).) (a) a=1:4:17 (b) b=[a(1:3) a] (c) c=[a;a] (d) d=[a a ] (e) e=[[a; a; a; a; a] a ] Dr./ Ahmed Nagib Elmekawy 3 of 11 Matlab Sheet 2

17. Using the zeros, ones, and eye commands create the following arrays by typing one command: 18. The following table shows the hourly wages, hours worked, and output (number of widgets produced) in one week for five widget makers. Use MATLAB to answer these questions: a. How much did each worker earn in the week? b. What is the total salary amount paid out? c. How many widgets were made? d. What is the average cost to produce one widget? e. How many hours does it take to produce one widget on average? f. Assuming that the output of each worker has the same quality, which worker is the most efficient? Which is the least efficient? 19. The potential energy stored in a spring is kx 2 /2, where k is the spring constant and x is the compression in the spring. The force required to compress the spring is kx. The following table gives the data for five springs: Dr./ Ahmed Nagib Elmekawy 4 of 11 Matlab Sheet 2

Use MATLAB to find (a) the compression x in each spring (b) the potential energy stored in each spring. 20. A water tank consists of a cylindrical part of radius r and height h, and a hemispherical top. The tank is to be constructed to hold 500 m 3 of fluid when filled. The surface area of the cylindrical part is 2πrh, and its volume is πr 2 h. The surface area of the hemispherical top is given by 2πr 2, and its volume is given by 2πr 3 /3. The cost to construct the cylindrical part of the tank is $300/m 2 of surface area; the hemispherical part costs $400/m 2. Plot the cost versus r for 2 r 10 m, and determine the radius that results in the least cost. Compute the corresponding height h. 21. A cable of length Lc supports a beam of length Lb, so that it is horizontal when the weight W is attached at the beam end. The principles of statics can be used to show that the tension force T in the cable is given by T = L bl c W D L 2 b D 2 where D is the distance of the cable attachment point to the beam pivot. See Fig. 1. a. For the case where W = 400 N, Lb = 3 m, and Lc = 5 m, use element-by element operations and the min function to compute the value of D that minimizes the tension T. Compute the minimum tension value. b. Check the sensitivity of the solution by plotting T versus D. How much can D vary from its optimal value before the tension T increases 10 percent above its minimum value? Fig. 1. Dr./ Ahmed Nagib Elmekawy 5 of 11 Matlab Sheet 2

22. Use MATLAB to find the products AB and BA for the following matrices: A = [ 11 5 8 ] B = [ 7 9 4 6 2 ] 23. The following tables show the costs associated with a certain product and the production volume for the four quarters of the business year. Use MATLAB to find a. The quarterly costs for materials, labor, and transportation. b. The total material, labor, and transportation costs for the year c. The total quarterly costs. 24. Aluminum alloys are made by adding other elements to aluminum to improve its properties, such as hardness or tensile strength. The following table shows the composition of ve commonly used alloys, which are known by their alloy numbers (2024, 6061, and so on). Obtain a matrix algorithm to compute the amounts of raw materials needed to produce a given amount of each alloy. Use MATLAB to determine how much raw material of each type is needed to produce 1000 tons of each alloy. Dr./ Ahmed Nagib Elmekawy 6 of 11 Matlab Sheet 2

25. The lift-to-drag ratio is an indication of the effectiveness of an airfoil. The equations for lift and drag are where, for a particular airfoil, the lift and drag coefficients versus angle of attack, are given by Using the first two equations, we see that the lift-to-drag ratio is given simply by the ratio CL /CD. Plot L/D versus, for -2 α 22. Determine the angle of attack that maximizes L/D. 26. Solve the following equations 4.5x 1 + 6.8x 2 + 6x 3 + 2x 4 = 5 1.2x 1 + 3x 2 + 9.1x 3 + 10x 4 = 5 x 2 + 4x 3 + 5.1x 4 + x 1 5.9 = 0 3x 1 + x 2 + x 3 + 5x 4 = 7.5 27. Find the roots of the following equations a. y 3 + 32y 2 + y = 127 b. 3d 4 + 2d 3 + d 2 = 65 Dr./ Ahmed Nagib Elmekawy 7 of 11 Matlab Sheet 2

28. The hydraulic cylinder shown ill figure has a bore diameter (A) and operates at a pressure of 5.5 MPa. The diameter of bolts used are 20mm and the bore diameter varies from (200 to 1000 mm). Find the safety factor of if the bolt is made from carbon steel with yield stress of 460 MPa. The number of bolts used is 6. F = π 4 A2 Pressure F Bolt = σ Bolt = F No. of Bolts F Bolt π 4 d 2 Bolt Fig. 2. Dr./ Ahmed Nagib Elmekawy 8 of 11 Matlab Sheet 2

29. A screw jack as shown in Fig.3 has the following data: Outer and inner diameter of the screw is 20 mm and 15 mm, pitch 5 mm, square threads, coefficient of friction, μ, is 0.15 and its lead, l, is 10 mm. Find the torque required, T, for rising the car if the capacity of the screw jack, F = (10,12,1.1,16,18,20,2'2) kn. The following formula can be applied, where T = F l + 2μπd m sec α πd m μl sec α d m mean diameter= (inner diameter +outer diameter)/2 α: angle and equal to zero Fig.3. Dr./ Ahmed Nagib Elmekawy 9 of 11 Matlab Sheet 2

30. The pin connector shown in Fig. 4 is subjected to a load of 18 KN. Find the stresses acting at the pin if its diameter is (10, 12, 14, 16 and 20 mm). Take a=10 mm and b=15 mm. I = π 64 d4 τ = σ b = F 2πd 2 /4 F(a + b)d 8I σ c = F bd Fig.4. 31. A shaft is subjected to an axial load of 12 KN and bending moment of 300 N.m. Find the suitable diameter of the shaft if the allowable stress for shaft material 200 Mpa 32. A 0.75 kw electric motor runs at 30 rev/s; see the fig. 5. The gears has a normal pressure angle ( n ) of 20, helix angle (φ) is 30 and normal module (m n ) is 2 mm find the different forces acting between the gears if the power transmitted changes from 0.75 to 10 kw, d=diameter of gear N = number of teeth for gear m t = d/n, tangential module m n = m t cos φ tan n = tan t cos φ F t = T R, tangential force R = diameter of gear 2 F r = F t tan t, radial force F a = F t tan φ, axial force Fig. 5. Dr./ Ahmed Nagib Elmekawy 10 of 11 Matlab Sheet 2

33. For the pressure cylinder shown in fig. 6. determine the radial and tangential stresses for different values of r (60, 70, 80, 90, 100). The internal pressure is 6 bar and no external pressure. The inner and outer diameters of the cylinder are 120 and 200 mm. σ t = p ir i 2 p o r o 2 r i 2 r o 2 (p o p i )/r 2 r o 2 r i 2 σ r = p ir i 2 p o r o 2 + r i 2 r o 2 (p o p i )/r 2 r o 2 r i 2 Fig. 6. 34. For the flat belt shown in fig 7, study the effect of large pulley diameter on both belt length and contact angle, also find the driving torque acting on small pulley if the power transmitted 12 kw, the speed of small pulley is 1200 rpm and its diameter is 200 mm, the center distance between the two shafts (C) is 1 m. L = [4C 2 (D + d) 2 ] 0.5 + 0.5(D + d)θ D + d 1 θ = π + 2 sin 2C Fig. 7. Dr./ Ahmed Nagib Elmekawy 11 of 11 Matlab Sheet 2