Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  The Teacher's Book /  Basic Calculations /  One Thing after Another /

3.7 Doing Computations in Notebooks

A typical Mathematica TE notebook containing text, graphics and Mathematica TE expressions. The brackets on the right indicate the extent of each cell.

Mathematica TE notebooks are structured interactive documents that are organized into a sequence of cells. Each cell contains material of a definite type--usually text, graphics, sounds or Mathematica TE expressions. When a notebook is displayed on the screen, the extent of each cell is indicated by a bracket on the right.
The notebook front end for Mathematica TE provides many ways to enter and edit the material in a notebook. Some of these ways will be standard to whatever computer system or graphical interface you are using. Others are specific to Mathematica TE.

Doing a computation in a Mathematica notebook.

Once you have prepared the material in a cell, you can send it as input to the Mathematica TE kernel simply by pressing ShiftKey KeyBar ReturnKey or ShiftKey KeyBar EnterKey. The kernel will send back whatever output is generated, and the front end will create new cells in your notebook to display this output. Note that on systems where both ReturnKey and EnterKey keys are available, EnterKey alone is typically equivalent to ShiftKey KeyBar ReturnKey.

Here is a cell ready to be sent as input to the Mathematica TE kernel.

The output from the computation is inserted in a new cell.

Most kinds of output that you get in Mathematica TE notebooks can readily be edited, just like input. Usually Mathematica TE will make a copy of the output when you first start editing it, so you can keep track of the original output and its edited form.
Once you have done the editing you want, you can typically just press ShiftKey KeyBar ReturnKey to send what you have created as input to the Mathematica TE kernel.

Here is a typical computation in a Mathematica TE notebook.

Mathematica TE will automatically make a copy if you start editing the output.

After you have edited the output, you can send it back as further input to the Mathematica TE kernel.

When you do computations in a Mathematica TE notebook, each line of input is typically labeled with In[n]:=, while each line of output is labeled with the corresponding Out[n]=.
There is no reason, however, that successive lines of input and output should necessarily appear one after the other in your notebook. Often, for example, you will want to go back to an earlier part of your notebook, and reevaluate some input you gave before.
It is important to realize that wherever a particular expression appears in your notebook, it is the line number given in In[n]:= or Out[n]= that determines when the expression was processed by the Mathematica TE kernel. Thus, for example, the fact that one expression may appear earlier than another in your notebook does not mean that it will have been evaluated first by the kernel. This will only be the case if it has a lower line number.

Each line of input and output is given a label when it is evaluated by the kernel. It is these labels, not the position of the expression in the notebook, that indicate the ordering of evaluation by the kernel.

If you make a mistake and try to enter input that the Mathematica TE kernel does not understand, then the front end will produce a beep. In general, you will get a beep whenever something goes wrong in the front end. You can find out the origin of the beep using the Why the Beep? command in the Help menu.

Operations on graphics and sounds.