Introduction to Programming with Mathematica, Third Edition

Chapter 2: The Mathematica Language

Expressions are the basic building blocks from which everything is built. Their structure, internal representation, and how they are evaluated are essential to understanding Mathematica. In this chapter we focus on the Mathematica language with particular emphasis on the structure and syntax of expressions. We will also look at how to define and name new expressions, how to combine them using logical operators, and how to control properties of your expressions through the use of attributes.

2.1 Expressions

Introduction

Although it may appear different at first, everything that you will work with in Mathematica has a similar underlying structure. This means things like a simple computation, a data object, a graphic, the cells in your Mathematica notebook, even your notebook itself, all have a similar structure ? they are all expressions, and an understanding of expressions is essential to mastering Mathematica.

Internal forms of expressions

When doing a simple arithmetic operation such as 3 + 4 * 5, you are usually not concerned with exactly how a system such as Mathematica actually performs the additions or multiplications. Yet you will find it extremely useful to be able to see the internal representation of such expressions as this will allow you to manipulate them in a consistent and powerful manner.

Internally, Mathematica groups the objects that it operates on into different types: integers are distinct from real numbers; lists are distinct from numbers. One of the reasons that it is useful to identify...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: RF Power Detectors
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.