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: [mg83407] Re: [mg83369] Basic Question about Mathematica
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 19 Nov 2007 06:23:20 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200711180954.EAA01658@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Welcome to the Mathematica community!

The quick and easy answer about getting Mathematica to "forget 
everything" is to use the menu item Evaluation > Quit Kernel. If offered 
a further choice, click the fly-out Local.

(That is in Mathematica version 6.  For earlier versions, it would be 
instead Kernel > Quit Kernel.)

There are fancier ways to accomplish what you want without quitting the 
kernel (and quitting the kernel will entail the slight delay as the 
kernel restarts the next time you evaluate an input cell), but the above 
works.

I should say, though, that you really want Mathematica to behave the way 
you find inhibiting at present in your first efforts.  Part of the power 
is that Mathematica "remembers" what rules you have told it (and this 
includes assignments to "variables" and definitions of "functions") at a 
given session.  And you will wind up, I think, liking the convenience of 
having all those Input/Output cells numbered sequentially by when you 
evaluated the input rather than where they are in the notebook. 
Moreover, if you have more than one notebook open at a given session, 
definitions you make in one can be used in another.

dmartin19 at gmail.com wrote:
> I only started using Mathematica yesterday, so please excuse this very
> newbie question.
> 
> 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?
> 
> 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.
> 
> Any help is appreciated!
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Plot to Plot3D problem
  • Next by Date: Re: memory release problem in mathematica6.0
  • Previous by thread: Basic Question about Mathematica
  • Next by thread: Re: Basic Question about Mathematica