page i
MATLAB for Engineering
Applications
William J. Palm III
University of Rhode Island
page ii
MATLAB FOR ENGINEERING APPLICATIONS
Published by McGraw Hill LLC, 1325 Avenue of the Americas, New York, NY 10019. Copyright 2023 by McGraw Hill LLC. All rights reserved. Printed in the United States of America. No part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written consent of McGraw Hill LLC, including, but not limited to, in any network or other electronic storage or transmission, or broadcast for distance learning.
Some ancillaries, including electronic and print components, may not be available to customers outside the United States.
This book is printed on acid-free paper.
1 2 3 4 5 6 7 8 9 LCR 27 26 25 24 23 22
ISBN 978-1-265-13919-3
MHID 1-265-13919-9
Cover Image: Getty Images/iStockphoto
All credits appearing on page or at the end of the book are considered to be an extension of the copyright page.
The Internet addresses listed in the text were accurate at the time of publication. The inclusion of a website does not indicate an endorsement by the authors or McGraw Hill LLC, and McGraw Hill LLC does not guarantee the accuracy of the information presented at these sites.
mheducation.com/highered
page iii
To my sisters, Linda and Chris, and to my parents, Lillian and William
page iv
ABOUT THE AUTHOR
William J. Palm III is Emeritus Professor of Mechanical Engineering at the University of Rhode Island. In 1966 he received a B.S. from Loyola College in Baltimore, and in 1971 a Ph.D. in Mechanical Engineering and Astronautical Sciences from Northwestern University in Evanston, Illinois.
During his 44 years as a faculty member, he taught 19 courses. One of these is a freshman MATLAB course, which he helped develop. He has authored eight textbooks dealing with modeling and simulation, system dynamics, control systems, and MATLAB. These include System Dynamics, 4th ed. (McGraw Hill, 2021). He wrote a chapter on control systems in the Mechanical Engineers Handbook, 3rd ed. (M. Kutz, ed., Wiley, 2016), and was a special contributor to the fifth editions of Statics and Dynamics, both by J. L. Meriam and L. G. Kraige (Wiley, 2002).
Professor Palms research and industrial experience are in control systems, robotics, vibrations, and system modeling. He was the Director of the Robotics Research Center at the University of Rhode Island from 1985 to 1993, and is the coholder of a patent for a robot hand. He served as Acting Department Chair from 2002 to 2003. His industrial experience is in automated manufacturing; modeling and simulation of naval systems, including underwater vehicles and tracking systems; and design of control systems for underwater-vehicle engine-test facilities.
page v
CONTENTS
page vi
page vii
Numbered Examples
Number and Topic
Chapter One
1.11 Volume of a Circular Cylinder
1.61 Piston Motion
Chapter two
2.31 Vectors and Displacement
2.32 Aortic Pressure Model
2.33 Transportation Route Analysis
2.34 Current and Power Dissipation in Resistors
2.35 A Batch Distillation Process
2.41 Miles Traveled
2.42 Height versus Velocity
2.43 Manufacturing Cost Analysis
2.44 Product Cost Analysis
2.45 Force Analysis of a 3-Bar Simple Truss
2.46 Circuit with Three Resistances
2.47 Production Planning
2.48 Force Analysis of a Bolt
2.49 Computing Forces and Moments on a Tower
2.51 Earthquake-Resistant Building Design
2.61 An Environment Database
2.71 A Student Database
Chapter three
3.21 Minimum Cost Design of a Water Tower
3.22 Optimization of an Irrigation Channel
3.31 Extra Parameters in fzero and fminbnd
3.32 An Intercept Course
3.33 Topping the Green Monster
3.34 Speed Estimation from Sonar Measurements
3.41 Creating a Data File and Loading It into a Variable
Chapter four
4.31 Height and Speed of a Projectile
4.51 Series Calculation with a for Loop
4.52 Plotting with a for Loop
4.53 Analyzing Trajectories
4.54 Motion in One Dimension
4.55 Data Sorting
4.61 Series Calculation with a while Loop
4.62 Growth of a Bank Account
4.63 Structural Analysis
4.71 Using the switch Structure for Calendar Calculations
4.91 A Pursuit Curve
4.92 Flight of an Instrumented Rocket
4.93 Time to Reach a Specified Height
4.94 A College Enrollment Model: Part I
4.95 A College Enrollment Model: Part II
Chapter five
5.11 Plotting Trajectories
5.21 Fishing Near an International Boundary
5.22 Plotting Orbits
Chapter six
6.11 Speed Estimation from Sonar Measurements
6.12 Temperature Dynamics
6.13 Hydraulic Resistance
6.14 A Cantilever Beam Model
6.21 Effect of Polynomial Degree
page viii
6.22 Estimation of Traffic Flow
6.23 Modeling Bacteria Growth
6.24 Breaking Strength and Alloy Composition
6.25 Response of a Biomedical Instrument
6.26 Fitting the Logistic Model
Chapter seven
7.11 Breaking Strength of Thread
7.21 Mean and Standard Deviation of Heights
7.22 Estimation of Height Distribution
7.31 Statistical Analysis and Manufacturing Tolerances
7.32 A Random Walk with Drift
Chapter eight
8.11 The Matrix Inverse Method
8.21 Left-Division Method with Three Unknowns
8.22 Calculation of Cable Tension
8.23 An Electric Resistance Network
8.24 Ethanol Production
8.31 An Underdetermined Set with Three Equations and Three Unknowns
8.32 A Statically Indeterminate Problem
8.33 Three Equations in Three Unknowns
8.34 Production Planning
8.35 Traffic Engineering
8.41 The Least-Squares Method
8.42 An Overdetermined Set
Chapter nine
9.11 Velocity from an Accelerometer
9.12 Evaluation of Fresnels Cosine Integral
9.13 Double Integral over a Nonrectangular Region
9.31 Response of an RC Circuit
9.32 Liquid Height in a Spherical Tank
9.41 Pursuit Equations
9.42 A Nonlinear Pendulum Model
9.51 Trapezoidal Profile for a DC Motor
Chapter ten
10.21 Simulink Solution of y = 10 y + f ( t )
10.31 Simulink Model of a Two-Mass Suspension System
10.41 Simulink Model of a Rocket-Propelled Sled
10.42 Model of a Relay-Controlled Motor
10.51 Response with a Dead Zone
10.61 Model of a Nonlinear Pendulum
Chapter eleven
11.21 Intersection of Two Circles
11.22 Positioning a Robot Arm
11.31 Topping the Green Monster
page ix
PREFACE
F ormerly used mainly by specialists in signal processing and numerical analysis, MATLAB has achieved widespread and enthusiastic acceptance throughout the engineering community. Many engineering schools require a course based entirely or in part on MATLAB early in the curriculum. MATLAB is programmable and has the same logical, relational, conditional, and loop structures as other programming languages. Thus it can be used to teach programming principles. In most engineering schools, MATLAB is the principal computational tool used throughout the curriculum. In some technical specialties, such as signal processing and control systems, it is the standard software package for analysis and design.
Next page