how call a function by same name in 2 different contexts?
- To: mathgroup at smc.vnet.net
- Subject: [mg56715] how call a function by same name in 2 different contexts?
- From: "steve" <nma124 at hotmail.com>
- Date: Wed, 4 May 2005 00:34:23 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
There is a function called FourierTransform that is part of standard
When I load the SignalProcessing package (a standalone Mathematica
application), it also comes with its own version of FourierTransform
The question is how can I, after loading the SignalProcessing package,
specify explicitly which function I wish to call?
I found that I could do the above as follows.
To call the standard function type
To call the function in SignalProcessing package, do
The problem with the above solution is that I had to know before
hand inside which context the FourierTransform function lived in
the SignalProcessing package, by typing the command
Is there a better way to do this? Why can't I just say
something like "Call the FourierTransform function which
is part of the SignalProcessing package" without having
to know the full contextPath?
But the bigger problem is that after I loaded the SignalProcessing
package, the Context[FourierTransform] does NOT list the
System`FourierTransform any more, even though I call
still access this context as follows
It seems that loading the SignalProcessing package hides the
context of the FourierTransform function in the System package
as you can see:
I was expecting this output
So that I can see where each function is and then call any one
I want without ambiguity.
Any idea how to handle all of this stuff? I do not think it is nice
that one package hides away another function of the same name in
different package. The whole idea of using packages is so that this
sort of thing should not happen !
Is there a way to unload a specific package after loading it without
having to restart Mathematica to clean things out?
Thank you for any insight into this issue
Prev by Date:
Re: managing order of magnitude instead of numbers
Next by Date:
Re: Reading from a file.
Previous by thread:
Re: Cases and Nonatomic expression
Next by thread:
Re: how call a function by same name in 2 different contexts?