MathGroup Archive 1998

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

Search the Archive

Re: Two questions



Hi Selwyn:
 
 I'll try to answer your 2nd question.
 
 There are (at least) two things you can do:
 1. Suppose you enter the command "Command[a]" which is actually defined
in
 a Mathematica package that you have neglected to read in.  Obviously
the command
 will not execute.  You now read in the required package and you find
the> command will   still not execute (because of shadowing).  One way
to now cure the problem is to execute:
 
 Clear[Command];
 Remove[Command];

 This clears the variable Global`Command, which is shadowing the
variable
 you want to use.  When you next execute "Command[a]" it will now
execute
 properly.
 
 2. There is a very nice package called "AntiShadow.m" that prevents
almost
 all shadowing problems of this type.  I believe this is available from
 MathSource.  I suggest you download this and load it automatically each
 time you boot Mathematica by placing a
 
 Needs["AntiShadow`"]
 
 command in your init.m file.
 
 (While you are at it why don't you download that other great package
 "CleanSlate.m" and also load it automatically with
 Needs["CleanSlate`"] )
 
 3. You could also place a DeclarePackage statement in your init.m file,
 however I don't recommend this solution.
 
 Hope this helps,
 
 Cheers,
 
 Des Penny

 
> Selwyn Hollis wrote:
> 
> > I have two questions that I hope someone can help me with.
> >
> > 1) Is there a way to use Plot3D to create a ``wireframe" surface
> > plot---that is, showing only the grid curves? (No, Shading->False is
> > not what I'm after. I want the plot to be _transparent._) If not, is
> > there a better way to do it than plotting curves with ParametricPlot3D?
> >
> > 2) I am continually forgetting to load a package before entering a
> > command that it contains. Is there a way to get out of the resulting
> > jam without quitting the kernel?
> >
> > Thanks!
> >
> > --
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr. Selwyn Hollis
> > Associate Professor of Mathematics
> > Armstrong Atlantic State University
> > Savannah, GA 31419 USA
> > <http://www.math.armstrong.edu/faculty/hollis/>
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi Selwyn:

I'll try to answer your 2nd question.

There are (at least) two things you can do: 1. Suppose you enter the
command "Command[a]" which is actually defined in a Mathematica package
that you have neglected to read in.  Obviously the command will not
execute.  You now read in the required package and you find the command
will still not execute (because of shadowing).  One way to now cure the
problem is to execute:

Clear[Command];
Remove[Command];

This clears the variable Global`Command, which is shadowing the variable
you want to use.  When you next execute "Command[a]" it will now
execute properly.

2. There is a very nice package called "AntiShadow.m" that prevents
almost all shadowing problems of this type.  I believe this is
available from MathSource.  I suggest you download this and load it
automatically each time you boot Mathematica by placing a

Needs["AntiShadow`"]

command in your init.m file.

(While you are at it why don't you download that other great package
"CleanSlate.m" and also load it automatically with Needs["CleanSlate`"]
)

3. You could also place a DeclarePackage statement in your init.m file,
however I don't recommend this solution.

Hope this helps,

Cheers,

Des Penny


Selwyn Hollis wrote:

> I have two questions that I hope someone can help me with.
>
> 1) Is there a way to use Plot3D to create a ``wireframe" surface
> plot---that is, showing only the grid curves? (No, Shading->False is
> not what I'm after. I want the plot to be _transparent._) If not, is
> there a better way to do it than plotting curves with ParametricPlot3D?
>
> 2) I am continually forgetting to load a package before entering a
> command that it contains. Is there a way to get out of the resulting
> jam without quitting the kernel?
>
> Thanks!
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dr. Selwyn Hollis
> Associate Professor of Mathematics
> Armstrong Atlantic State University
> Savannah, GA 31419 USA
> <http://www.math.armstrong.edu/faculty/hollis/>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



  • References:
    • Two questions
      • From: Selwyn Hollis <shollis@peachnet.campus.mci.net>
  • Prev by Date: Re: Problems ....
  • Next by Date: Re: Problems ....
  • Prev by thread: Re: Two questions
  • Next by thread: Re: Two questions