Synopses & Reviews
Mathematica Cookbook helps you master the application's core principles by walking you through real-world problems. Ideal for browsing, this book includes recipes for working with numerics, data structures, algebraic equations, calculus, and statistics. You'll also venture into exotic territory with recipes for data visualization using 2D and 3D graphic tools, image processing, and music.
Although Mathematica 7 is a highly advanced computational platform, the recipes in this book make it accessible to everyone -- whether you're working on high school algebra, simple graphs, PhD-level computation, financial analysis, or advanced engineering models.
- Learn how to use Mathematica at a higher level with functional programming and pattern matching
- Delve into the rich library of functions for string and structured text manipulation
- Learn how to apply the tools to physics and engineering problems
- Draw on Mathematica's access to physics, chemistry, and biology data
- Get techniques for solving equations in computational finance
- Learn how to use Mathematica for sophisticated image processing
- Process music and audio as musical notes, analog waveforms, or digital sound samples
Synopsis
With support from the developers of Mathematica, this cookbook will offer a wide range of valuable solutions for using this popular computational software application. Developed in 1988, Mathematica is widely used in several fields that rely on mathematical calculation, such as physics, engineering, and finance. This cookbook covers Mathematica 6, the major new release of the software, with recipes from key people in the Mathematica community on three-dimensional imagining, audio processing, calculations from mathematics and physics, and much more.
About the Author
Sal Mangano has been developing software since the days Borland Turbo C and has worked with an eclectic mix of programming languages and technologies. Sal worked on many mission-critical applications, especially in the area of financial-trading applications. In his day job, he works mostly with mainstream languages like C++ and Java so he chooses to play with more interesting technology whenever he gets a chance.
Sal's two books (XSLT Cookbook and Math Mathematica Cookbook) may seem to be an odd pair of technologies for a single author but there is a common theme that reflects his view at what makes a language powerful. Both Mathematica and XSLT rest on the idea of pattern matching and transformation. They may use these patterns in different ways and transformations to achieve different ends but they are both good at what they do and interesting to program in for a common reason. Sal's passion for these languages and ideas comes through in both these cookbooks. He also likes to push technologies as far as they can go and into every nook and cranny of application. This is reflected in the wide mix of recipes he assembled for these books.
Sal has a Master's degree in Computer Science from Polytechnic University.
Table of Contents
Preface; Introduction; MathematicaCookbook.com; Structure of This Book; Acknowledgments; Conventions Used in This Book; Using Code Examples; Safari® Enabled; How to Contact Us; Chapter 1: Numerics; 1.1 1.0 Introduction; 1.2 1.1 Controlling Precision and Accuracy; 1.3 1.2 Mixing Different Numerical Types; 1.4 1.3 Representing Numbers in Other Bases; 1.5 1.4 Extracting the Digits of a Number; 1.6 1.5 Working with Intervals; 1.7 1.6 Converting Between Numerical Types; 1.8 1.7 Displaying Numbers in Alternate Forms; Chapter 2: Functional Programming; 2.1 2.0 Introduction; 2.2 2.1 Mapping Functions with More Than One Argument; 2.3 2.2 Holding Arbitrary Arguments; 2.4 2.3 Creating Functions That Automatically Map Over Lists; 2.5 2.4 Mapping Multiple Functions in a Single Pass; 2.6 2.5 Keeping Track of the Index of Each Item As You Map; 2.7 2.6 Mapping a Function over a Moving Sublist; 2.8 2.7 Using Prefix and Postfix Notation to Produce More Readable Code; 2.9 2.8 Defining Indexed Functions; 2.10 2.9 Understanding the Use of Fold As an Alternative to Recursion; 2.11 2.10 Incremental Construction of Lists; 2.12 2.11 Computing Through Repeated Function Application; 2.13 2.12 Building a Function Through Iteration; 2.14 2.13 Exploiting Function Composition and Inverse Functions; 2.15 2.14 Implementing Closures; 2.16 2.15 Currying in Mathematica; 2.17 2.16 Creating Functions with Default Values; 2.18 2.17 Creating Functions That Accept Options; Chapter 3: Data Structures; 3.1 3.0 Introduction; 3.2 3.1 Ensuring the Most Efficient Representation of Numerical Lists; 3.3 3.2 Sorting Lists; 3.4 3.3 Determining Order Without Sorting; 3.5 3.4 Extracting the Diagonals of a Matrix; 3.6 3.5 Constructing Matrices of Specific Structure; 3.7 3.6 Constructing Permutation and Shift Matrices; 3.8 3.7 Manipulating Rows and Columns of Matrices; 3.9 3.8 Using Sparse Arrays to Conserve Memory; 3.10 3.9 Manipulating Deeply Nested Lists Using Functions with Level Specifications; 3.11 3.10 Implementing Bit Vectors and Using Format to Customize Their Presentation; 3.12 3.11 Implementing Trees and Traversals Using Lists; 3.13 3.12 Implementing Ordered Associative Lookup Using a Red-Black Tree; 3.14 3.13 Exploiting Mathematica's Built-In Associative Lookup; 3.15 3.14 Constructing Graphs Using the Combinatorica' Package; 3.16 3.15 Using Graph Algorithms to Extract Information from Graphs; Chapter 4: Patterns and Rule-Based Programming; 4.1 4.0 Introduction; 4.2 4.1 Collecting Items That Match (or Don't Match) a Pattern; 4.3 4.2 Excluding Items That Match (or Don't Match) a Pattern; 4.4 4.3 Counting Items That Match a Pattern; 4.5 4.4 Replacing Parts of an Expression; 4.6 4.5 Finding the Longest (or Shortest) Match for a Pattern; 4.7 4.6 Implementing Algorithms in Terms of Rules; 4.8 4.7 Debugging Infinite Loops When Using ReplaceRepeated; 4.9 4.8 Preventing Evaluation Until Replace Is Complete; 4.10 4.9 Manipulating Patterns with Patterns; 4.11 4.10 Optimizing Rules; 4.12 4.11 Using Patterns As a Query Language; 4.13 4.12 Semantic Pattern Matching; 4.14 4.13 Unification Pattern Matching; Chapter 5: String and Text Processing; 5.1 5.0 Introduction; 5.2 5.1 Comparing Strings; 5.3 5.2 Removing and Replacing Characters from Strings; 5.4 5.3 Extracting Characters and Substrings; 5.5 5.4 Duplicating a String; 5.6 5.5 Matching and Searching Text; 5.7 5.6 Tokenizing Text; 5.8 5.7 Working with Natural Language Dictionaries; 5.9 5.8 Importing XML; 5.10 5.9 Transforming XML Using Patterns and Rules; 5.11 5.10 Transforming XML Using Recursive Functions (