Preface 

xiii  


1  (14) 






1  (1) 


1  (2) 


3  (1) 


3  (1) 

Accessing Scripts and Function Files 


4  (1) 

Command Window Management 


4  (1) 

Script and Function Output to the Command Window 


5  (1) 


6  (1) 


6  (2) 

Some Suggestions on How to Use Matlab 


8  (7) 


9  (4) 

Appendix A Summary of Matlab Special Characters 


13  (2) 


15  (54) 






15  (1) 


16  (3) 


16  (1) 


16  (1) 

Column and Row Matrices (Vectors) 


17  (1) 

Transpose of a Matrix and a Vector 


18  (1) 


19  (5) 


24  (11) 


35  (6) 

Mathematical Operation with Matrices 


41  (28) 


41  (1) 


41  (12) 


53  (1) 


54  (3) 

Solution of a System of Equations 


57  (2) 


59  (10) 


69  (12) 





Strings (Literals) and Annotated Output 


69  (6) 


75  (2) 


75  (1) 


76  (1) 


76  (1) 


77  (1) 


77  (4) 


80  (1) 


81  (20) 






81  (2) 


83  (10) 


83  (1) 


84  (2) 


86  (5) 

Early Termination of Either a for or while Loop 


91  (1) 


91  (2) 

Two Applications of Program Control Structures 


93  (8) 

Generation of a 2k Factorial Table 


93  (2) 

Multiple Root Finding Using Interval Halving 


95  (2) 


97  (4) 


101  (58) 






102  (1) 


102  (1) 


102  (1) 


103  (1) 


103  (1) 


103  (5) 

Form #1: Input Arguments Individually Identified and One Output Variable 


104  (2) 

Form #2: Input Arguments Represented as a Vector and One Output Variable 


106  (1) 

Form #3: Input Arguments Represented as a Vector and Each Output Variable Individually Identified 


106  (2) 


108  (1) 


108  (1) 

Creating Functions That Use feval (Function of Functions) 


109  (1) 

Matlab Functions That Use feval 


110  (22) 

Zeros of Functionsfzero, and roots/poly 


111  (6) 

Numerical Integrationquad8, trapz, and polyarea 


117  (3) 

Local Minimum of a Functionfminbnd 


120  (2) 

Numerical Solution of Ordinary Differential Equationsode45 


122  (9) 

Numerical Solutions of Nonlinear Equationsfsolve 


131  (1) 

Examples of Several Other Matlab Functions 


132  (27) 

Fitting Data with Polynomialspolyfit/polyval 


132  (2) 

Interpolation of Datainterpl 


134  (2) 


136  (2) 

Digital Signal Processingfft and ifft 


138  (6) 


144  (15) 


159  (48) 






159  (4) 

Basic 2D Plotting Commands 


163  (9) 


163  (1) 


163  (3) 


166  (1) 


166  (1) 


167  (3) 

Multiple Functions on One Figure 


170  (2) 

Graph Annotation and Visual Enhancement 


172  (35) 

Axes and Curve Labels, Figure Titles, Legends, Text, and Other Attributes 


172  (8) 

Repeating Curves: Display of cot(x) From 0 ≤ x ≤ mπ 


180  (2) 

Polar Plot: Far Field Radiation Pattern of a Sound Source 


182  (2) 

Multiple Figures: Spectral Plot of a Periodic Pulse Train and a Single Pulse 


184  (2) 

Multiple Curves: Notch Sensitivity for Steel 


186  (2) 

Multiple Curves with Different yaxes: plotyy 


188  (1) 

Reading Numerical Values from Graphs: ginput 


189  (2) 

Area Fill Using Random Numbers 


191  (1) 


192  (15) 


207  (32) 






207  (3) 


210  (29) 


232  (7) 

Design of Machine Elements 


239  (82) 





Vectors, Forces, and the Equilibrium of Rigid Bodies 


239  (11) 

Stresses and Deflections in Beams, Columns, and Shafts 


250  (21) 

Statically Determinate Beams 


250  (11) 


261  (2) 


263  (2) 

Shafts Subjected to Alternating Loads 


265  (6) 


271  (9) 

Kinematics of a FourBar Linkage 


280  (7) 

Position and Velocity of the Links 


280  (5) 

Synthesis of a Fourbar Linkage 


285  (2) 

Cam Profiles and Synthesis 


287  (10) 


287  (3) 

Translating FlatFace Follower 


290  (3) 

Translating Offset Roller Follower 


293  (2) 


295  (2) 


297  (4) 

PDE Toolbox and the Stress Concentration Factor for Notches in a Thin Plate 


301  (20) 


309  (12) 


321  (70) 






321  (3) 

SingleDegreeofFreedom Systems 


324  (23) 


324  (2) 

Free Oscillations of Linear Systems 


326  (6) 

Free Oscillations of Nonlinear Systems 


332  (6) 

Forced Oscillations of Linear and Nonlinear Systems 


338  (3) 

Frequency Response and the Response to Step and Impulse Excitations 


341  (6) 

MultiDegreeofFreedom Systems 


347  (10) 


347  (6) 

Forced Oscillations and the Vibration Absorber 


353  (4) 


357  (34) 

Beams with Uniform Cross Section 


357  (9) 

Beams with Variable Cross Section 


366  (2) 

Beam Carrying a Concentrated Mass 


368  (4) 


372  (9) 

Appendix B Beam Functions Used in Section 9.4 


381  (10) 


391  (88) 





Introduction to Control System Design 


392  (2) 

Tools for Controller Design 


392  (1) 

Naming and File Conventions 


393  (1) 

Representations of Systems in Matlab 


394  (17) 


395  (6) 

TransferFunction Representation 


401  (2) 


403  (3) 


406  (4) 

Conversion between Representations 


410  (1) 


411  (12) 


411  (4) 

Estimating Response from Poles and Zeros 


415  (8) 


423  (14) 


424  (3) 


427  (10) 


437  (42) 

Notch Control of a Flexible Pointer 


438  (7) 

PID Control of a Magnetic Suspension System 


445  (9) 

Lead Control of an Inverted Pendulum 


454  (7) 

Control of a Magnetically Suspended Flywheel 


461  (9) 


470  (9) 


479  (38) 






479  (7) 

Pressure Distribution in the Standard Atmosphere 


480  (1) 


481  (5) 


486  (7) 

Laminar Flow in a Horizontal Pipe with Various Cross Sections 


486  (3) 

Downward Flow in a Vertical Pipe 


489  (1) 


490  (3) 


493  (24) 

Boundary Layer on an Infinite Plate Started Suddenly from Rest 


493  (1) 


494  (3) 


497  (8) 


505  (12) 


517  (54) 






518  (7) 

Transient Heat Conduction in a SemiInfinite Slab with Surface Convection 


518  (1) 

Transient Heat Conduction in an Infinite Solid Cylinder with Convection 


519  (2) 

Transient OneDimensional Conduction with a Heat Source 


521  (4) 

Sizing of Shell and Tube Heat Exchangers 


525  (11) 


536  (14) 

Thermal Boundary Layer on a Flat PlateSimilarity Solution 


536  (5) 

Natural Convection Similarity Solution 


541  (7) 

Temperature Distribution in a Printed Circuit Board 


548  (2) 


550  (21) 

Radiation View FactorDifferential Area to Arbitrary Rectangle in Parallel Planes 


550  (5) 

View Factor between Two Rectangles in Parallel Planes 


555  (3) 

Enclosure Radiation with Diffuse Gray Walls 


558  (3) 

Transient Radiation Heating of a Plate in a Furnace 


561  (1) 


562  (9) 


571  (48) 





Definition, Formulation, and Graphical Solutions 


571  (3) 


571  (1) 


572  (2) 


574  (2) 


576  (6) 


577  (1) 


578  (2) 


580  (2) 

SingleObjective Constrained Methods 


582  (15) 

Constrained SingleVariable Method 


582  (1) 

Constrained MultiVariable Method 


583  (10) 


593  (1) 

SemiInfinitely Constrained Method 


594  (3) 

Multiobjective Optimization 


597  (22) 


605  (14) 


619  (66) 





Descriptive Statistical Quantities 


619  (7) 

Probability Distributions 


626  (14) 


626  (3) 


629  (11) 


640  (4) 


644  (5) 


649  (10) 


649  (3) 

Multiple Linear Regression 


652  (7) 


659  (26) 

SingleFactor Experiments: Analysis of Variance 


659  (3) 

MultipleFactor Experiments 


662  (12) 


674  (11) 
Index 

685  