An Introduction to Programming with Mathematica is the first book published expressly to teach Mathematica as a programming language to scientists, engineers, mathematicians, and computer scientists. This text may be used in a first or second course on programming at the undergraduate level or in a Mathematica-related course in engineering, mathematics, or the sciences. It is also intended for individual study by students and professionals. The text does not assume familiarity with Mathematica nor does it require any prior programming experience. The book and diskette contain over 200 exercises drawn from many areas of science, engineering, mathematics, and computer science. The 3 1/2'' diskette included with this book can be read by UNIX, IBM-compatible, NeXT, and Macintosh computers. The diskette includes Notebooks and packages containing the code for all of the examples and exercises in the text, as well as additional material extending many of the ideas in the text. The packages will run on any computer running Mathematica and the Notebooks will run on any computer that supports Mathematica Notebooks. Version 2.0 or later of Mathematica is recommended for maximum use of the diskette.



Inhalt

1 | Preliminaries.- 1.1 Introduction.- 1.2 What is in This Book.- 1.3 Basics.- 1.3.1 Getting Into and Out of Mathematica.- 1.3.2 Getting Help.- 1.3.3 The Syntax of Inputs.- 1.3.4 Internal Forms of Expressions.- 1.3.5 Postfx Form.- 1.3.6 Errors.- 1.4 Predicates and Boolean Operations.- 1.4.1 Predicates.- 1.4.2 Relational and Logical Operators.- 1.5 Evaluation of Expressions.- 1.5.1 Trace and TracePrint.- 1.5.2 Timing.- 1.5.3 Attributes.- 1.6 The Mathematica Interface.- 1.6.1 The Notebook Front End.- 1.6.2 The Command Line Interface.- 2 | A Brief Overview of Mathematica.- 2.1 Numerical and Symbolic Computations.- 2.2 Functions.- 2.2.1 Functions of Number Theory.- 2.2.2 Random Numbers.- 2.2.3 Packages.- 2.3 Graphics.- 2.3.1 Two-Dimensional Plots.- 2.3.2 Parametric Plots.- 2.3.3 Three-Dimensional Plots.- 2.4 Representation of Data.- 2.5 Programming.- 2.5.1 Example - Harmonic Numbers.- 2.5.2 Example - Perfect Numbers.- 3 | List Manipulation.- 3.1 Introduction.- 3.2 Creating and Measuring Lists.- 3.2.1 List Construction.- 3.2.2 Dimensions of Lists.- 3.3 Working With the Elements of a List.- 3.3.1 Positions in a List.- 3.3.2 Extracting Elements and Rearranging Lists.- 3.4 Working with Several Lists.- 3.5 Higher-Order Functions.- 3.6 Applying Functions to Lists Repeatedly.- 3.7 Strings and Characters.- 4 | Functions.- 4.1 Introduction.- 4.2 Programs as Functions.- 4.2.1 Nesting Function Calls.- 4.2.2 Value Names.- 4.3 User-Defined Functions.- 4.4 Auxiliary Functions.- 4.4.1 Compound Functions.- 4.4.2 Localizing Names.- 4.5 Anonymous Functions.- 4.6 One-Liners.- 4.6.1 The Josephus Problem.- 4.6.2 Pocket Change.- 5 | Evaluation of Expressions.- 5.1 Introduction.- 5.2 Creating Rewrite Rules.- 5.2.1 The Global Rule Base.- 5.3 Expressions.- 5.3.1 Atoms.- 5.4 Patterns.- 5.4.1 Blanks.- 5.4.2 Expression Pattern-Matching.- 5.4.3 Sequence Pattern-Matching.- 5.4.4 Conditional Pattern-Matching.- 5.4.5 Alternatives.- 5.5 Term Rewriting.- 5.6 Transformation Rules.- 6 | Conditional Function Definitions.- 6.1 Introduction.- 6.2 Conditional Functions.- 6.3 Summary of Conditionals.- 6.4 Example Classifying Points.- 7 | Recursion.- 7.1 Fibonacci Numbers.- 7.2 List Functions.- 7.3 Thinking Recursively.- 7.4 Recursion and Symbolic Computations.- 7.5 Gaussian Elimination.- 7.6 Binary Trees.- 7.6.1 Huffman Encoding.- 7.7 Dynamic Programming.- 7.8 Higher-Order Functions and Recursion.- 7.9 Debugging.- 7.9.1 Tracing Evaluation.- 7.9.2 Printing Variables.- 7.9.3 Common Errors.- 8 | Iteration.- 8.1 Newton's Method.- 8.1.1 While Loops.- 8.2 Vectors and Matrices.- 8.2.1 List Component Assignment.- 8.2.2 Finding Prime Numbers.- 8.3 Passing Arrays to Functions.- 8.4 Gaussian Elimination Revisited.- 9 | Numerics.- 9.1 Types of Numbers.- 9.1.1 Integers and Rationals.- 9.1.2 Real Numbers.- 9.1.3 Complex Numbers.- 9.1.4 Computing with Different Number Types.- 9.1.5 Digits and Number Bases.- 9.2 Random Numbers.- 9.3 Precision and Accuracy.- 9.3.1 Roundoff Errors.- 9.4 Numerical Computations.- 9.4.1 Newton's Method Revisited.- 9.4.2 Gaussian Elimination Revisited Again.- 10 | Graphics Programming.- 10.1 Graphics Primitives.- 10.1.1 Two-Dimensional Graphics Primitives.- 10.1.2 Three-Dimensional Graphics Primitives.- 10.2 Graphics Directives and Options.- 10.3 Built-In Graphics Functions.- 10.3.1 The Structure of Built-In Graphics.- 10.3.2 Graphics Anomalies.- 10.3.3 Options for Built-In Graphics Functions.- 10.4 Graphics Programming.- 10.4.1 Simple Closed Paths.- 10.4.2 Drawing Trees.- 10.5 Sound.- 10.5.1 The Sound of Mathematics.- 10.5.2 White Music, Brownian Music, and Fractal Noise.- 11 | Contexts and Packages.- 11.1 Introduction.- 11.2 Using Packages.- 11.3 Contexts.- 11.3.1 Summary.- 11.4 Packages.- 11.4.1 Summary.- 11.5 The BaseConvert Package.- 11.5.1 Summary.- 11.6 Miscellaneous Topics.- 11.6.1 Avoiding Name Collisions.- 11.6.2 Finding Out What's in a Package.

Titel
Introduction to Programming with Mathematica®
Untertitel
Includes diskette
EAN
9781475711325
Format
E-Book (pdf)
Veröffentlichung
17.04.2013
Digitaler Kopierschutz
Wasserzeichen
Dateigrösse
21.64 MB
Anzahl Seiten
302