13.07.2015 Views

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

Mathematica Tutorial: Notebooks And Documents - Wolfram Research

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Notebooks</strong> and <strong>Documents</strong> 161In[20]:=Here is a simple notebook with the current selection being the contents of a cell.nb = InputNotebook@D;In[21]:=This replaces the current selection by a string that contains a copy of its previous form.NotebookApply@nb, "x + 1êÉ"DSelectionEvaluate@objDSelectionCreateCell@objDSelectionEvaluateCreateCell@objDSelectionAnimate@objDSelectionAnimate@obj,tDevaluate the current selection in placecreate a new cell containing just the current selectionevaluate the current selection and create a new cell for theresultanimate graphics in the current selectionanimate graphics for t secondsOperations on the current selection.In[22]:=This makes the current selection be the whole contents of the cell.SelectionMove@nb, All, CellContentsDIn[23]:=This evaluates the current selection in place.SelectionEvaluate@nbDSelectionEvaluate allows you to take material from a notebook and send it through the kernelfor evaluation. On its own, however, SelectionEvaluate always overwrites the material youtook. But by using functions like SelectionCreateCell you can maintain a record of thesequence of forms that are generated~just like in a standard <strong>Mathematica</strong> session.This makes the current selection be the whole cell.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!