An Engineer's Guide to MATLAB, 3/e, is an authoritative guide to generating readable, compact, and verifiably correct MATLAB programs. It is ideal for undergraduate engineering courses in Mechanical, Aeronautical, Civil, and Electrical engineering that require/use MATLAB. This highly respected guide helps students develop a strong working knowledge of MATLAB that can be used to solve a wide range of engineering problems. Since solving these problems usually involves writing relatively short, one-time-use programs, the authors demonstrate how to effectively develop programs that are compact yet readable, easy to debug, and quick to execute. Emphasis is on using MATLAB to obtain solutions to several classes of engineering problems, so technical material is presented in summary form only. The new edition has been thoroughly revised and tested for software release 2009.
Author(s): Edward B. Magrab, Shapour Azarm, Balakumar Balachandran, James Duncan, Keith Herold, Gregory Walsh
Edition: 3rd
Publisher: Prentice Hall
Year: 2010
Language: English
Pages: 846
Cover ......Page 1
Title Page ......Page 4
Copyright ......Page 5
Contents......Page 8
List of Examples......Page 16
Preface to Third Edition......Page 22
1.1 Introduction......Page 24
1.1.2 Some Suggestions on How to Use MATLAB......Page 25
1.2.1 Introduction......Page 26
1.2.2 Preliminaries—Command Window Management......Page 28
1.2.3 Executing Expressions from the MATLAB Command Window—Basic MATLAB Syntax......Page 31
1.2.4 Clarification and Exceptions to MATLAB’S Syntax......Page 34
1.2.5 MATLAB Functions......Page 37
1.2.6 Creating Scripts and Executing Them from the MATLAB Editor......Page 42
1.3 Online Help......Page 52
1.4 The Symbolic Toolbox......Page 55
1.5 Summary of Functions Introduced in Chapter 1......Page 64
Exercises......Page 65
2.1 Introduction......Page 74
2.2 Definitions of Matrices and Vectors......Page 75
2.3 Creation of Vectors......Page 76
2.4 Creation of Matrices......Page 87
2.5 Dot Operations......Page 106
2.6.2 Multiplication......Page 115
2.6.3 Determinants......Page 124
2.6.4 Matrix Inverse......Page 127
2.6.5 Solution of a System of Equations......Page 130
2.7 Summary of Functions Introduced in Chapter 2......Page 135
Exercises......Page 136
3.1.1 Creating Strings......Page 150
3.1.2 Converting Numerical Values to Strings and Displaying Them......Page 153
3.2.1 Entering a Scalar with input......Page 158
3.2.2 Entering a String with input......Page 159
3.3 Input/Output Data Files......Page 160
3.4 Cell Arrays......Page 164
3.5 Input Microsoft Excel Files......Page 166
3.6 Summary of Functions Introduced in Chapter 3......Page 167
Exercises......Page 168
4.1 Introduction—The Logical Operator......Page 171
4.2.1 Branching—If Statement......Page 174
4.2.2 Branching—Switch Statement......Page 177
4.2.3 For Loop......Page 178
4.2.4 While Loop......Page 185
4.3 Summary of Functions Introduced in Chapter 4......Page 189
Exercises......Page 190
5 Function Creation and Selected MATLAB Functions......Page 195
5.1.1 Why Use Functions......Page 196
5.1.4 Debugging Functions......Page 197
5.2.2 Function File......Page 198
5.2.3 Subfunctions......Page 204
5.2.4 Anonymous Functions......Page 206
5.2.5 inline......Page 207
5.2.6 Comparison of the Usage of Subfunctions, Anonymous Functions, and inline......Page 208
5.3 User-Defined Functions, Function Handles, and feval......Page 209
5.4.1 Introduction......Page 210
5.4.2 Fitting Data with Polynomials—polyfit/polyval......Page 211
5.4.3 Fitting Data with spline......Page 213
5.4.4 Interpolation of Data—interp1......Page 215
5.4.5 Numerical Integration—trapz......Page 216
5.4.6 Area of a Polygon—polyarea......Page 218
5.4.7 Digital Signal Processing—fft and ifft......Page 219
5.5 MATLAB Functions that Require User-Defined Functions......Page 224
5.5.1 Zeros of Functions—fzero and roots/poly......Page 225
5.5.2 Numerical Integration—quadl and dblquad......Page 230
5.5.3 Numerical Solutions of Ordinary Differential Equations—ode45......Page 235
5.5.4 Numerical Solutions of Ordinary Differential Equations—bvp4c......Page 240
5.5.5 Numerical Solutions of Delay Differential Equations—dde23......Page 254
5.5.6 Numerical Solutions of One-Dimensional Parabolic–Elliptic Partial Differential Equations—pdepe......Page 256
5.5.7 Local Minimum of a Function—fminbnd......Page 258
5.5.8 Numerical Solutions of Nonlinear Equations—fsolve......Page 261
5.6 Symbolic Solutions and Converting Symbolic Expressions into Functions......Page 263
5.7 Summary of Functions Introduced in Chapter 5......Page 269
Exercises......Page 270
6 2D Graphics......Page 288
6.1 Introduction: Graphics Management......Page 289
6.2.1 Introduction......Page 292
6.2.3 Special Purpose Graphs......Page 304
6.2.4 Reading, Displaying, and Manipulating Digital Images......Page 311
6.3.2 Axes and Curve Labels, Figure Titles, Legends, and Text Placement......Page 314
6.3.3 Filling Regions......Page 317
6.3.4 Greek Letters, Mathematical Symbols, Subscripts, and Superscripts......Page 319
6.3.5 Altering the Attributes of Axes, Curves,Text, and Legends......Page 322
6.3.6 Positioning One Figure Inside Another Figure......Page 327
6.3.7 Interactive Plotting Tools......Page 329
6.3.8 Animation......Page 330
6.4 Examples......Page 332
6.5 Summary of Functions Introduced in Chapter 6......Page 341
Exercises......Page 342
7.1 Lines in 3D......Page 361
7.2 Surfaces......Page 364
7.3 Summary of Functions Introduced in Chapter 7......Page 392
Exercises......Page 393
8.1 Descriptive Statistical Quantities......Page 400
8.2.1 Discrete Distributions......Page 406
8.2.2 Continuous Distributions......Page 410
8.3 Confidence Intervals......Page 420
8.4 Hypothesis Testing......Page 424
8.5.1 Simple Linear Regression......Page 427
8.5.2 Multiple Linear Regression......Page 431
8.6.1 Single-Factor Experiments: Analysis of Variance......Page 438
8.6.2 Multiple-Factor Factorial Experiments......Page 442
8.7 Summary of Functions Introduced in Chapter 8......Page 458
Exercises......Page 459
9 Dynamics and Vibrations......Page 468
9.1.1 Planar Pendulum......Page 469
9.1.2 Orbital Motions......Page 470
9.1.3 Principal Moments of Inertia......Page 473
9.1.4 Stability of a Rigid Body......Page 474
9.2.1 Introduction......Page 477
9.2.2 Linear Systems: Free Oscillations......Page 479
9.2.3 Linear Systems: Forced Oscillations......Page 485
9.2.4 Nonlinear Systems: Free Oscillations......Page 492
9.2.5 Nonlinear Systems: Forced Oscillations......Page 501
9.3.1 Two-Degree-of-Freedom Systems: Free and Forced Oscillations......Page 504
9.3.2 Natural Frequencies and Mode Shapes......Page 518
9.4.1 Natural Frequencies and Mode Shapes of Euler–Bernoulli and Timoshenko Beams......Page 522
9.4.2 Forced Oscillations of Euler–Bernoulli Beams......Page 532
9.5 Summary of Functions Introduced in Chapter 9......Page 536
Exercises......Page 537
10 Control Systems......Page 547
10.1 Introduction to Control System Design......Page 548
10.1.1 Tools for Controller Design......Page 550
10.2 Representation of Systems in MATLAB......Page 551
10.2.1 State–Space Models......Page 553
10.2.2 Transfer-Function Representation......Page 558
10.2.3 Discrete-Time Models......Page 561
10.2.4 Block Diagrams and SIMULINK......Page 565
10.2.5 Conversion Between Representations......Page 569
10.3 Response of Systems......Page 570
10.3.1 Estimating Response from Systems......Page 571
10.3.2 Estimating Response from Poles and Zeros......Page 574
10.3.3 Estimating Systems from Response......Page 581
10.4 Design Tools......Page 583
10.4.1 Design Criteria......Page 584
10.4.2 Design Tools......Page 587
10.5 Design Examples......Page 596
10.5.1 Notch Control of a Flexible Pointer......Page 597
10.5.2 PID Control of a Magnetic Suspension System......Page 605
10.5.3 Lead Control of an Inverted Pendulum......Page 612
10.5.4 Control of a Magnetically Suspended Flywheel......Page 619
10.6 Summary of Functions Introduced in Chapter 10......Page 628
Exercises......Page 629
11.1 Hydrostatics......Page 637
11.1.1 Pressure Distribution in the Standard Atmosphere......Page 638
11.1.2 Force on a Planar Gate......Page 639
11.2.1 Laminar Flow in a Horizontal Pipe with Circular Cross Section......Page 644
11.2.2 Downward Turbulent Flow in a Vertical Pipe......Page 645
11.2.3 Three Connected Reservoirs......Page 647
11.3.1 Boundary Layer on an Infinite Plate Started Suddenly from Rest......Page 649
11.3.2 Blasius Boundary Layer......Page 651
11.3.3 Potential Flow......Page 654
11.3.4 Joukowski Airfoils......Page 659
11.4 Open Channel Flow......Page 664
11.5 Biological Flows......Page 669
Exercises......Page 671
12 Heat Transfer......Page 682
12.1.1 Transient Heat Conduction in a Semi-Infinite Slab with Surface Convection......Page 683
12.1.2 Transient Heat Conduction in an Infinite Solid Cylinder with Convection......Page 685
12.1.3 Transient One-Dimensional Conduction with a Heat Source......Page 687
12.2.1 Internal Flow Convection: Pipe Flow......Page 691
12.2.2 Thermal Boundary Layer on a Flat Plate: Similarity Solution......Page 695
12.2.3 Natural Convection Similarity Solution......Page 700
12.3.1 Radiation View Factor: Differential Area to Arbitrary Rectangle in Parallel Planes......Page 705
12.3.2 View Factor Between Two Rectangles in Parallel Planes......Page 708
12.3.3 Enclosure Radiation with Diffuse Gray Walls......Page 710
12.3.4 Transient Radiation Heating of a Plate in a Furnace......Page 713
Exercises......Page 715
13 Optimization......Page 725
13.1.2 Graphical Solution......Page 726
13.2 Linear Programming......Page 729
13.3 Binary Integer Programming......Page 732
13.4.1 Unconstrained Optimization......Page 733
13.4.2 Curve Fitting: One Independent Variable......Page 736
13.4.3 Curve Fitting: Several Independent Variables......Page 738
13.5.1 Constrained Single-Variable Method......Page 742
13.5.2 Constrained Multivariable Method......Page 744
13.5.3 Quadratic Programming......Page 753
13.5.4 Semi-Infinitely Constrained Method......Page 755
13.6 Multiobjective Optimization......Page 759
13.7 Genetic Algorithm-Based Optimization......Page 765
13.8 Summary of Functions Introduced in Chapter 13......Page 774
Exercises......Page 775
14 Biological Systems: Transport of Heat, Mass, and Electric Charge......Page 792
14.1.1 Heat Transfer in Perfused Tissue......Page 793
14.1.2 Thermal Conductivity Determination......Page 796
14.2.1 Bicarbonate Buffer System......Page 798
14.2.2 Carbon Dioxide Transport in Blood......Page 801
14.2.3 Oxygen Transport in Blood......Page 802
14.2.4 Perfusion Bioreactor......Page 805
14.2.5 Supply of Oxygen to a Spherical Tumor......Page 809
14.2.6 Krogh Cylinder Model of Tissue Oxygenation......Page 812
14.3.1 Hodgkin–Huxley Neuron Model......Page 819
14.3.2 Hodgkin–Huxley Gating Parameters......Page 820
14.3.3 Hodgkin–Huxley Model with Step Function Input......Page 825
14.3.4 Action Potential......Page 827
Exercises......Page 830
B......Page 835
E......Page 836
F......Page 837
I......Page 842
N......Page 843
R......Page 844
S......Page 845
W......Page 846