Essential MATLAB for Engineers and Scientists -  Brian H. Hahn,  Daniel T. Valentine

Essential MATLAB for Engineers and Scientists (eBook)

eBook Download: PDF
2007 | 3. Auflage
448 Seiten
Elsevier Science (Verlag)
978-0-08-047150-1 (ISBN)
Systemvoraussetzungen
38,95 inkl. MwSt
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
The essential guide to MATLAB as a problem solving tool

This text presents MATLAB both as a mathematical tool and a programming language, giving a concise and easy to master introduction to its potential and power. Stressing the importance of a structured approach to problem solving, the text gives a step-by-step method for program design and algorithm development. The fundamentals of MATLAB are illustrated throughout with many examples from a wide range of familiar scientific and engineering areas, as well as from everyday life.

Features:

. Numerous simple exercises provide hands-on learning of MATLAB's functions
. A new chapter on dynamical systems shows how a structured approach is used to solve more complex problems.
. Common errors and pitfalls highlighted
. Concise introduction to useful topics for solving problems in later engineering and science courses: vectors as arrays, arrays of characters, GUIs, advanced graphics, simulation and numerical methods
. Text and graphics in four colour
. Extensive instructor support

Essential MATLAB for Engineers and Scientists is an ideal textbook for a first course on MATLAB or an engineering problem solving course using MATLAB, as well as a self-learning tutorial for students and professionals expected to learn and apply MATLAB for themselves.

Additional material is available for lecturers only at http://textbooks.elsevier.com. This website provides lecturers with:
  • A series of Powerpoint presentations to assist lecture preparation
  • Extra quiz questions and problems
  • Additional topic material
  • M-files for the exercises and examples in the text (also available to students at the book's companion site)
  • Solutions to exercises
  • An interview with the revising author, Daniel Valentine


? Numerous simple exercises give hands-on learning
? A chapter on algorithm development and program design
? Common errors and pitfalls highlighted
? Concise introduction to useful topics for solving problems in later engineering and science courses: vectors as arrays, arrays of characters, GUIs, advanced graphics, simulation and numerical methods
? A new chapter on dynamical systems shows how a structured approach is used to solve more complex problems.
? Text and graphics in four colour
? Extensive teacher support on http://textbooks.elsevier.com: solutions manual, extra problems, multiple choice questions, PowerPoint slides
? Companion website for students providing M-files used within the book
Essential MATLAB for Engineers and Scientists, Third Edition, is an essential guide to MATLAB as a problem-solving tool. It presents MATLAB both as a mathematical tool and a programming language, giving a concise and easy-to-master introduction to its potential and power. Stressing the importance of a structured approach to problem solving, the text provides a step-by-step method for program design and algorithm development. It includes numerous simple exercises for hands-on learning, a chapter on algorithm development and program design, and a concise introduction to useful topics for solving problems in later engineering and science courses: vectors as arrays, arrays of characters, GUIs, advanced graphics, and simulation and numerical methods. The text is ideal for undergraduates in engineering and science taking a course on Matlab. Numerous simple exercises give hands-on learning A chapter on algorithm development and program design Common errors and pitfalls highlighted Concise introduction to useful topics for solving problems in later engineering and science courses: vectors as arrays, arrays of characters, GUIs, advanced graphics, simulation and numerical methods A new chapter on dynamical systems shows how a structured approach is used to solve more complex problems. Text and graphics in four colour

Cover 1
Copyright Page 5
Contents 6
Preface to the third edition 18
PART I: ESSENTIALS 22
Chapter 1 Introduction 24
1.1 Using MATLAB 25
1.2 The MATLAB desktop 36
1.3 Sample program 37
1.3.1 Cut and paste 37
1.3.2 Saving a program: script files 40
1.3.3 How a program works 42
Chapter 2 MATLAB fundamentals 45
2.1 Variables and the workspace 45
2.1.1 Variables 45
2.1.2 Case sensitivity 46
2.1.3 The workspace 46
2.1.4 Adding commonly used constants to the workspace 48
2.2 Arrays: vectors and matrices 48
2.2.1 Initializing vectors: explicit lists 49
2.2.2 Initializing vectors: the colon operator 50
2.2.3 linspace 51
2.2.4 Transposing vectors 51
2.2.5 Subscripts 52
2.2.6 Matrices 52
2.2.7 Capturing output 53
2.3 Vertical motion under gravity 54
2.4 Operators, expressions and statements 56
2.4.1 Numbers 56
2.4.2 Data types 57
2.4.3 Arithmetic operators 58
2.4.4 Precedence of operators 58
2.4.5 The colon operator 59
2.4.6 The transpose operator 60
2.4.7 Arithmetic operations on arrays 60
2.4.8 Expressions 62
2.4.9 Statements 62
2.4.10 Statements, commands and functions 64
2.4.11 Vectorization of formulae 64
2.5 Output 68
2.5.1 disp 68
2.5.2 format 70
2.5.3 Scale factors 71
2.6 Repeating with for 72
2.6.1 Square roots with Newton's method 72
2.6.2 Factorials! 74
2.6.3 Limit of a sequence 74
2.6.4 The basic for construct 75
2.6.5 for in a single line 77
2.6.6 More general for 77
2.6.7 Avoid for loops by vectorizing! 77
2.6.8 A common mistake: for less loops! 80
2.7 Decisions 81
2.7.1 The one-line if statement 81
2.7.2 The if-else construct 83
2.7.3 The one-line if-else statement 84
2.7.4 elseif 85
2.7.5 Logical operators 86
2.7.6 Multiple ifs versus elseif 86
2.7.7 Nested ifs 88
2.7.8 Vectorizing ifs? 89
2.7.9 switch 89
2.8 Complex numbers 90
2.9 More on input and output 92
2.9.1 fprintf 92
2.9.2 Output to a disk file with fprintf 94
2.9.3 General file I/O 94
2.9.4 Saving and loading data 94
2.10 Odds 'n ends 94
2.10.1 Variables, functions and scripts with the same name 94
2.10.2 The input statement 95
2.10.3 Shelling out to the operating system 96
2.10.4 More Help functions 97
2.11 Programming style 97
Chapter 3 Program design and algorithm development 107
3.1 Computer program design process 108
3.1.1 Projectile problem example 110
3.2 Other examples of structure plans 119
3.2.1 Quadratic equation 120
3.3 Structured programming with functions 121
Chapter 4 MATLAB functions & *data import-export utilities
4.1 Some common functions 126
4.2 *Importing and exporting data 131
4.2.1 The load and save commands 131
4.2.2 Exporting text (ASCII) data 131
4.2.3 Importing text (ASCII) data 132
4.2.4 Exporting binary data 132
4.2.5 The Import Wizard 133
4.2.6 Low-level file I/O functions 134
4.2.7 Other import/export functions 139
Chapter 5 Logical vectors 142
5.1 Examples 143
5.1.1 Discontinuous graphs 143
5.1.2 Avoiding division by zero 144
5.1.3 Avoiding infinity 146
5.1.4 Counting random numbers 147
5.1.5 Rolling dice 148
5.2 Logical operators 148
5.2.1 Operator precedence 150
5.2.2 Danger 151
5.2.3 Logical operators and vectors 151
5.3 Subscripting with logical vectors 152
5.4 Logical functions 154
5.4.1 Using any and all 155
5.5 Logical vectors instead of elseif ladders 156
Chapter 6 Matrices of numbers & arrays of strings
6.1 Matrices 163
6.1.1 A concrete example 163
6.1.2 Creating matrices 164
6.1.3 Subscripts 165
6.1.4 Transpose 165
6.1.5 The colon operator 165
6.1.6 Duplicating rows and columns: tiling 169
6.1.7 Deleting rows and columns 169
6.1.8 Elementary matrices 170
6.1.9 *Specialized matrices 171
6.1.10 Using MATLAB functions with matrices 172
6.1.11 Manipulating matrices 173
6.1.12 Array (element-by-element) operations on matrices 174
6.1.13 Matrices and for 174
6.1.14 Visualization of matrices 175
6.1.15 Vectorizing nested fors: loan repayment tables 175
6.1.16 Multidimensional arrays 177
6.2 Matrix operations 178
6.2.1 Matrix multiplication 178
6.2.2 Matrix exponentiation 180
6.3 Other matrix functions 181
6.4 *Strings 181
6.4.1 Assignment 181
6.4.2 Input 181
6.4.3 Strings are arrays 182
6.4.4 Concatenation of strings 182
6.4.5 ASCII codes, double and char 183
6.4.6 fprintf of strings 184
6.4.7 Comparing strings 184
6.4.8 Other string functions 185
6.5 *Two-dimensional strings 185
6.6 *eval and text macros 186
6.6.1 Error trapping with eval and lasterr 187
6.6.2 eval with tryƒcatch 188
Chapter 7 Introduction to graphics 192
7.1 Basic 2-D graphs 192
7.1.1 Labels 194
7.1.2 Multiple plots on the same axes 194
7.1.3 Line styles, markers and color 195
7.1.4 Axis limits 196
7.1.5 Multiple plots in a figure: subplot 197
7.1.6 figure, clf and cla 199
7.1.7 Graphical input 199
7.1.8 Logarithmic plots 199
7.1.9 Polar plots 200
7.1.10 Plotting rapidly changing mathematical functions: fplot 201
7.1.11 The property editor 202
7.2 3-D plots 202
7.2.1 plot3 203
7.2.2 Animated 3-D plots with comet3 204
7.2.3 Mesh surfaces 204
7.2.4 Contour plots 207
7.2.5 Cropping a surface with NaNs 208
7.2.6 Visualizing vector fields 209
7.2.7 Visualization of matrices 210
7.2.8 Rotation of 3-D graphs 211
7.2.9 Other cool graphics functions 213
Chapter 8 Loops 226
8.1 Determinate repetition with for 226
8.1.1 Binomial coefficient 226
8.1.2 Update processes 227
8.1.3 Nested fors 229
8.2 Indeterminate repetition with while 229
8.2.1 A guessing game 229
8.2.2 The while statement 230
8.2.3 Doubling time of an investment 231
8.2.4 Prime numbers 232
8.2.5 Projectile trajectory 233
8.2.6 break and continue 236
8.2.7 Menus 236
Chapter 9 Errors and pitfalls 243
9.1 Syntax errors 243
9.1.1 lasterr 246
9.2 Pitfalls and surprises 246
9.2.1 Incompatible vector sizes 246
9.2.2 Name hiding 246
9.2.3 Other pitfalls for the unwary 247
9.3 Errors in logic 247
9.4 Rounding error 247
9.5 Trapping and generating errors 249
Chapter 10 Function M-files 251
10.1 Some examples 251
10.1.1 Inline objects: harmonic oscillators 251
10.1.2 Function M-files: Newton's method again 253
10.2 Basic rules 254
10.2.1 Subfunctions 260
10.2.2 Private functions 260
10.2.3 P-code files 260
10.2.4 Improving M-file performance with the profiler 261
10.3 Function handles 261
10.4 Command/function duality 263
10.5 Function name resolution 264
10.6 Debugging M-files 264
10.6.1 Debugging a script 265
10.6.2 Debugging a function 267
10.7 Recursion 267
Chapter 11 Vectors as arrays & *advanced data structures
11.1 Update processes 272
11.1.1 Unit time steps 273
11.1.2 Non-unit time steps 276
11.1.3 Using a function 277
11.1.4 Exact solution 279
11.2 Frequencies, bar charts and histograms 280
11.2.1 A random walk 280
11.2.2 Histograms 281
11.3 *Sorting 282
11.3.1 Bubble Sort 282
11.3.2 MATLAB's sort 284
11.4 *Structures 285
11.5 *Cell arrays 288
11.5.1 Assigning data to cell arrays 288
11.5.2 Accessing data in cell arrays 289
11.5.3 Using cell arrays 290
11.5.4 Displaying and visualizing cell arrays 291
11.6 *Classes and objects 291
Chapter 12 *More graphics 293
12.1 Handle Graphics 293
12.1.1 Getting handles 294
12.1.2 Graphics object properties and how to change them 295
12.1.3 A vector of handles 297
12.1.4 Graphics object creation functions 298
12.1.5 Parenting 298
12.1.6 Positioning figures 299
12.2 Editing plots 300
12.2.1 Plot edit mode 300
12.2.2 Property Editor 301
12.3 Animation 302
12.3.1 Animation with Handle Graphics 303
12.4 Color etc. 306
12.4.1 Colormaps 306
12.4.2 Color of surface plots 308
12.4.3 Truecolor 309
12.5 Lighting and camera 309
12.6 Saving, printing and exporting graphs 310
12.6.1 Saving and opening figure files 310
12.6.2 Printing a graph 311
12.6.3 Exporting a graph 311
Chapter 13 *Graphical User Interfaces (GUIs) 313
13.1 Basic structure of a GUI 313
13.2 A first example: getting the time 314
13.2.1 Exercise 318
13.3 Newton again 318
13.4 Axes on a GUI 322
13.5 Adding color to a button 323
PART II: APPLICATIONS 326
Chapter 14 Dynamical systems 328
14.1 Cantilever beam 330
14.2 Electric current 332
14.3 Free fall 335
14.4 Projectile with friction 344
Chapter 15 Simulation 349
15.1 Random number generation 349
15.1.1 Seeding rand 350
15.2 Spinning coins 350
15.3 Rolling dice 351
15.4 Bacteria division 352
15.5 A random walk 352
15.6 Traffic flow 354
15.7 Normal (Gaussian) random numbers 357
Chapter 16 *More matrices 362
16.1 Leslie matrices: population growth 362
16.2 Markov processes 366
16.2.1 A random walk 366
16.3 Linear equations 369
16.3.1 MATLAB's solution 370
16.3.2 The residual 371
16.3.3 Overdetermined systems 371
16.3.4 Underdetermined systems 372
16.3.5 Ill conditioning 372
16.3.6 Matrix division 373
16.4 Sparse matrices 375
Chapter 17 *Introduction to numerical methods 380
17.1 Equations 380
17.1.1 Newton's method 380
17.1.2 The Bisection method 383
17.1.3 fzero 385
17.1.4 roots 385
17.2 Integration 385
17.2.1 The Trapezoidal rule 386
17.2.2 Simpson's rule 387
17.2.3 quad 388
17.3 Numerical differentiation 388
17.3.1 diff 389
17.4 First-order differential equations 390
17.4.1 Euler's method 390
17.4.2 Example: bacteria growth 391
17.4.3 Alternative subscript notation 392
17.4.4 A predictor-corrector method 394
17.5 Linear ordinary differential equations (LODEs) 395
17.6 Runge-Kutta methods 396
17.6.1 A single differential equation 396
17.6.2 Systems of differential equations: chaos 397
17.6.3 Passing additional parameters to an ODE solver 400
17.7 A partial differential equation 402
17.7.1 Heat conduction 402
17.8 Other numerical methods 406
Appendix A: Syntax quick reference 411
A.1 Expressions 411
A.2 Function M-files 411
A.3 Graphics 411
A.4 if and switch 412
A.5 for and while 413
A.6 Input/output 414
A.7 load/ save 414
A.8 Vectors and matrices 414
Appendix B: Operators 416
Appendix C: Command and functionquick reference 417
C.1 General purpose commands 418
C.1.1 Managing commands 418
C.1.2 Managing variables and the workspace 418
C.1.3 Files and the operating system 418
C.1.4 Controlling the Command Window 419
C.1.5 Starting and quitting MATLAB 419
C.2 Logical functions 419
C.3 Language constructs and debugging 419
C.3.1 MATLAB as a programming language 419
C.3.2 Interactive input 420
C.4 Matrices and matrix manipulation 420
C.4.1 Elementary matrices 420
C.4.2 Special variables and constants 420
C.4.3 Time and date 421
C.4.4 Matrix manipulation 421
C.4.5 Specialized matrices 421
C.5 Mathematical functions 421
C.6 Matrix functions 422
C.7 Data analysis 423
C.8 Polynomial functions 423
C.9 Function functions 423
C.10 Sparse matrix functions 423
C.11 Character string functions 424
C.12 File I/O functions 424
C.13 Graphics 424
C.13.1 2-D 424
C.13.2 3-D 425
C.13.3 General 425
Appendix D: ASCII character codes 426
Appendix E: Solutions to selected exercises 427
Index 442
A 442
B 442
C 442
D 443
E 443
F 444
G 444
H 445
I 445
J 445
K 445
L 445
M 446
N 446
O 446
P 446
Q 447
R 447
S 447
T 448
U 448
V 448
W 449
X 449
Y 449
Z 449

Erscheint lt. Verlag 29.1.2007
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Mathematik / Informatik Mathematik Algebra
Mathematik / Informatik Mathematik Angewandte Mathematik
Naturwissenschaften
Technik
ISBN-10 0-08-047150-1 / 0080471501
ISBN-13 978-0-08-047150-1 / 9780080471501
Haben Sie eine Frage zum Produkt?
PDFPDF (Adobe DRM)
Größe: 3,9 MB

Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine Adobe-ID und die Software Adobe Digital Editions (kostenlos). Von der Benutzung der OverDrive Media Console raten wir Ihnen ab. Erfahrungsgemäß treten hier gehäuft Probleme mit dem Adobe DRM auf.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine Adobe-ID sowie eine kostenlose App.
Geräteliste und zusätzliche Hinweise

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich
Das Handbuch für Webentwickler

von Philip Ackermann

eBook Download (2023)
Rheinwerk Computing (Verlag)
49,90
Das umfassende Handbuch

von Johannes Ernesti; Peter Kaiser

eBook Download (2023)
Rheinwerk Computing (Verlag)
44,90
Deterministische und randomisierte Algorithmen

von Volker Turau; Christoph Weyer

eBook Download (2024)
De Gruyter (Verlag)
59,95