1. Feb 23, 2005

Yesterday, I loaded a package so that I could plot a direction field of a differential equation. It worked just fine. The problem is that now that I want to do it again, it won't work! Using the same Mathematica Notebook, I tried the following:

<<GraphicsPlotField

2. ENTER THE COMMAND AGAIN

PlotVectorField[{1, 9.8-v/5}, {t, 0, 10}, {v, 40, 60}, ScaleFunction->(1&), Axes->True, AspectRatio->1, AxesLabel->{"t", "v"}]

As soon as I enter the command, the output is not a plot, it is the command itself!!! I also checked out the help section, but I couldn't find anything for this particular problem.

Any help is highly appreciated.

2. Feb 23, 2005

### PerennialII

I've noticed something similar on a couple of occations and haven't really figured how to get over it ... the "solution" I've adopted is to write the line again after completely deleting it, which is a really :yuck: solution (or shutting down kernel etc.). Have been able to repeat the problem with some packages, don't know whether it has something to do with "row history" or something like that, as bizarre as it sounds ...

3. Feb 23, 2005

### chroot

Staff Emeritus
Why would you want to load the same package more than once?

- Warren

4. Feb 23, 2005

Well, I tried to reload it since I closed Mathematica and its notebook yesterday. Now I see what you mean. Next time, I just shouldn't worry and redo things (the package remains loaded if I keep a copy of the notebook)! Thank you guys.

5. Feb 24, 2005

### Davorak

Look up "needs" command in help. This will only load the package if it has not already been loaded.

Alternatively if the problem has already happened you can use the "clear" and "remove" functions to remove the function. Then when you load the package again the function will be reloaded as well.

On a side note...
Same sort of problem can happen if you evaluate a user defined function multiple times.
Using "clear" and/or "remove" works in this case too.

6. Feb 25, 2005

### PerennialII

Went through a script which was giving trouble and this was actually it, hadn't been careful with Clear etc. basic specs ...

Last edited: Feb 25, 2005