Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Basic Question about Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg83386] Re: Basic Question about Mathematica
  • From: Bill Rowe <readnewsciv at sbcglobal.net>
  • Date: Mon, 19 Nov 2007 06:12:25 -0500 (EST)

On 11/18/07 at 4:54 AM, dmartin19 at gmail.com wrote:

>I was working in a notebook, using help files to try to learn
>Mathematica. I noticed that Mathematica uses cells for entry, and
>each of my entries in a cell are tagged by numbers, such as "In[n]"
>and "Out[n]" where "n" is some number.

>Being new, I keep making a lot of mistakes while experimenting, and
>each time when I realize the mistake, I delete the cell and start
>over again. When I do this, Mathematica does not continue to number
>the "In[n]" and "Out[n]" lines sequentially based on what is
>actually on the notebook, but instead remembers the numbers from the
>deleted cells even after I have deleted them.

>Consequently, with only 10 or so cells on my notebook, I have
>numbers like "In[102]" because Mathematica is remembering all the
>deletions, and all the times I asked it to recalculate.

>What is worse is that it seems to remember errors and variables from
>the deleted cells. If I previously made a mistake with some variable
>or expression and deleted it, then tried to define it again, it
>gives me the same error I got before I deleted it.

>Clearing the history does not help.

>Is there any way to get Mathematica to totally forget stuff that I
>have deleted and only evaluate whatever is in the notebook at a
>given time?

Yes. The function ClearInOut in the package CleanSlate that can
be found at

<http://library.wolfram.com/infocenter/MathSource/4718/>

will help. This function will clear the history and reset the
In/Out numbers. But it will not execute any of the other cells
you want executed automatically. You will have to re-execute
these yourself.

>It would also be great if it could renumber the "In[n]" and "Out[n]"
>statements so they bear some semblance to the actual number of cells
>in my notebook.

There probably is a way to accomplish with some programming. But
this isn't likely to be a simple thing to do. And I expect in
the final analysis it will not be desirable.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: classes.m
  • Next by Date: Re: instantiate GUI or graphic elements interactively
  • Previous by thread: Re: Basic Question about Mathematica
  • Next by thread: Re: Basic Question about Mathematica