MathGroup Archive 1999

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

Search the Archive

Help: Debuging Functions in Mathematica

  • To: mathgroup at
  • Subject: [mg16860] Help: Debuging Functions in Mathematica
  • From: Boris Breznen <bbreznen at>
  • Date: Thu, 1 Apr 1999 21:35:27 -0500
  • Organization: Caltech
  • Sender: owner-wri-mathgroup at

This is a newbie question:

I am migrating from Matlab to Mathematica, but I find the transition
extrmemely painful (to the point of re-evaluating my decision). Here
is a trivial problem that I spent last 2 days trying to solve. When
you write a function in Matlab, you save it to a text file with
extension .m and then simply type the name of the file (function)
at the Matlab prompt to use it. When
you make changes in the source code you type "clear myFunction"
at matlab prompt, which removes the function definition and then
re-type the function name again. As simple as it gets ...

Now, how do you do the same thing in Mathematica ? I have
a function that I saved in a package format. The directory 
that contains the package is part of the $Path. When I put
Needs["myFunction`"] in a notebook the function works fine.
But now I want to change the source code. I edit the package,
go back to the notebook type Remove[myFunction] and at that
point Mathematica refuses to read the function again. Doesn't
matter if I use Needs, or <<, Mathematica doesn't re-load the
function. How the hell do you do this trivial task ?

Thank you


  • Prev by Date: Re: combinations
  • Next by Date: Q: LinkInterrupt[link]
  • Previous by thread: Re: combinations
  • Next by thread: RE: Help: Debuging Functions in Mathematica