An introduction to programming with Mathematica

Free Download

Authors:

Edition: 3

ISBN: 9780521846783, 0521846781

Size: 6 MB (6796085 bytes)

Pages: 556/556

File format:

Language:

Publishing Year:

Category:

Paul R. Wellin, Richard J. Gaylord, Samuel N. Kamin9780521846783, 0521846781

An Introduction to Programming with Mathematica® is designed to introduce the Mathematica programming language to a wide audience. Since the last edition of this book was published, significant changes have occurred in Mathematica and its use worldwide. Keeping pace with these changes, this substantially larger, updated version includes new and revised chapters on numerics, procedural, rule-based, and front-end programming, and gives significant coverage to the latest features up to, and including, Mathematica 5.1 Mathematica notebooks, available from www.cambridge.org/0521846781, contain examples, programs, and solutions to exercises in the book. Additionally, material to supplement later versions of the software will be made available. This is the ideal text for all scientific students, researchers, and programmers wishing to deepen their understanding of Mathematica, or even those keen to program using an interactive language that contains programming paradigms from all major programming languages: procedural, functional, recursive, rule-based, and object-oriented.

Table of contents :
Half-title……Page 3
Title……Page 5
Copyright……Page 6
Numerical computations……Page 7
Symbolic computations……Page 8
Graphics……Page 10
Working with data……Page 12
Programming……Page 14
Symbolic and interactive documents……Page 16
Starting Mathematica and first computations……Page 21
Entering input……Page 23
Ending a Mathematica session……Page 24
The syntax of inputs……Page 25
Alternate input syntax……Page 29
The front end and the kernel……Page 30
Errors……Page 31
Getting help……Page 32
The Help Browser……Page 33
Internal forms of expressions……Page 37
Atoms……Page 38
The structure of expressions……Page 39
Defining variables and functions……Page 43
Immediate vs. delayed assignments……Page 45
The global rule base……Page 46
Piecewise-defined functions……Page 48
Functions with multiple definitions……Page 49
Predicates……Page 51
Relational and logical operators……Page 52
2.4 Attributes……Page 56
3.1 Introduction……Page 59
List construction……Page 61
Measuring lists……Page 64
Testing a list……Page 66
Extracting elements……Page 67
Rearranging lists……Page 69
List component assignment……Page 72
3.4 Working with several lists……Page 75
3.5 Strings and characters……Page 76
4.1 Introduction……Page 81
4.2 Functions for manipulating expressions……Page 83
Map……Page 84
Thread and MapThread……Page 85
The Listable attribute……Page 86
Apply……Page 88
Inner and Outer……Page 90
4.3 Iterating functions……Page 92
User-defined functions……Page 94
Building up programs……Page 95
Compound functions……Page 102
Localizing names: Module……Page 104
Localizing constants: With……Page 105
4.6 Pure functions……Page 108
Hamming distance……Page 113
The Josephus problem……Page 115
Pocket change……Page 117
5.1 Introduction……Page 121
Newton’s method……Page 122
Do loops……Page 123
Example: Random permutations……Page 127
While loops……Page 129
NestWhile and NestWhileList……Page 133
Conditional functions……Page 137
Multiclause definitions……Page 140
Which and Switch……Page 142
Piecewise……Page 144
Argument checking……Page 145
Summary……Page 147
Sieve of Eratosthenes……Page 148
Classifying points……Page 151
6.1 Introduction……Page 155
Blanks……Page 157
Sequence pattern matching……Page 159
Example: Finding subsequences……Page 160
Attaching a predicate……Page 162
Attaching a condition……Page 164
Alternatives……Page 165
String patterns……Page 167
6.3 Transformation rules……Page 170
Example: Finding maxima……Page 173
Encoding text……Page 176
Sorting a list……Page 178
7.1 Fibonacci numbers……Page 183
7.2 List functions……Page 186
Finding maxima……Page 189
Subsets……Page 190
Run-length encoding……Page 192
7.4 Recursion and symbolic computations……Page 198
Merge sort……Page 204
Gaussian elimination……Page 206
Trees……Page 209
Huffman encoding……Page 211
7.6 Dynamic programming……Page 222
7.7 Higher-order functions and recursion……Page 225
8.1 Introduction……Page 227
Types of numbers……Page 230
Digits and number bases……Page 233
Random numbers……Page 235
Precision and accuracy……Page 240
Representation of approximate numbers……Page 242
Exact vs. approximate numbers……Page 244
High precision vs. machine precision……Page 245
Roundoff errors……Page 248
Computing with different number types……Page 250
Sparse arrays……Page 253
Packed arrays……Page 256
8.5 Numerical computations……Page 259
Working with precision and accuracy……Page 260
Newton’s method revisited……Page 263
Gaussian elimination revisited……Page 266
Primitives, directives, and options……Page 275
Root plotting……Page 285
Plotting data……Page 288
Simple closed paths……Page 293
Drawing trees……Page 298
The sound of mathematics……Page 304
White noise, white music……Page 308
Brownian music……Page 309
10.1 Introduction……Page 315
Notebook expressions……Page 316
Manipulating notebooks……Page 319
10.3 Cell data types……Page 325
TextData……Page 326
BoxData……Page 327
GraphicsData……Page 328
ShowTable……Page 330
TriangleForm……Page 333
10.5 Buttons……Page 337
The structure of buttons……Page 338
ButtonStyle……Page 340
ButtonFunction……Page 341
Example: an evaluate button……Page 344
Introduction……Page 347
Getting the data into Mathematica……Page 348
Examining the data file……Page 351
Extracting and converting data……Page 353
Visualizing the data……Page 354
The one-dimensional random walk……Page 357
The two-dimensional random walk……Page 358
Visualizing the random walk……Page 359
The three-dimensional random walk……Page 362
Adding options and defaults……Page 363
Error-trapping and messaging……Page 367
Creating Help Browser documentation……Page 369
11.3 The Game of Life……Page 372
Introduction to PDL……Page 380
Syntax……Page 382
Parsing……Page 384
Lexical analysis……Page 387
Computing shapes……Page 395
12.1 Introduction……Page 401
Loading packages……Page 402
Finding out what is in a package……Page 403
Avoiding name collisions……Page 404
12.3 Contexts……Page 407
12.4 The elements of packages……Page 412
Summary……Page 413
Importing other packages……Page 414
Usage statements……Page 415
The function definitions……Page 416
EndPackage……Page 417
Examples……Page 418
Evaluation of expressions……Page 423
Tracing evaluation……Page 426
Reap and Sow……Page 428
Common errors……Page 429
References……Page 433
2.1 Expressions……Page 437
2.2 Definitions……Page 438
2.3 Predicates and Boolean operations……Page 439
3.2 Creating and measuring lists……Page 440
3.3 Manipulating lists……Page 441
3.4 Working with several lists……Page 442
3.5 Strings and characters……Page 443
4.2 Functions for manipulating expressions……Page 447
4.4 Programs as functions……Page 451
4.5 Auxiliary functions……Page 453
4.6 Pure functions……Page 456
4.7 One-liners……Page 462
5.2 Loops and iteration……Page 465
5.3 Flow control……Page 471
5.4 Examples……Page 473
6.2 Patterns……Page 474
6.3 Transformation rules……Page 479
6.4 Examples……Page 482
7.1 Fibonacci numbers……Page 486
7.2 List functions……Page 487
7.3 Thinking recursively: examples……Page 488
7.4 Recursion and symbolic computations……Page 490
7.5 Classical examples……Page 492
7.6 Dynamic programming……Page 496
7.7 Higher-order functions and recursion……Page 497
8.2 Numbers……Page 498
8.3 Working with numbers……Page 504
8.4 Working with arrays of numbers……Page 505
8.5 Numerical computations……Page 507
9.1 Structure of graphics……Page 509
9.2 Graphics programming……Page 516
9.3 Sound……Page 524
10.2 The structure of cells and notebooks……Page 528
10.4 GridBoxes……Page 529
10.5 Buttons……Page 532
11.1 Manipulating data files……Page 535
11.2 Random walks……Page 538
11.3 The Game of Life……Page 541
12.5 Writing your own packages……Page 543
Index……Page 545

Reviews

There are no reviews yet.

Be the first to review “An introduction to programming with Mathematica”
Shopping Cart
Scroll to Top