[Date Index]
[Thread Index]
[Author Index]
Re: Re: listing user defined, independent variables
*To*: mathgroup at smc.vnet.net
*Subject*: [mg96832] Re: [mg96782] Re: listing user defined, independent variables
*From*: "Paul Ellsmore" <paul.ellsmore at nanion.co.uk>
*Date*: Thu, 26 Feb 2009 07:51:23 -0500 (EST)
*References*: <go0j0p$mta$1@smc.vnet.net> <200902250900.EAA15505@smc.vnet.net>
Hi Jens,
To your point a), what I mean is that, in the calculations that my notebook
carries out, some variables get defined by the user assigning a value (a
constant) directly to them. Others get defined in the code by assigning a
value to them that depends on a calculation involving other variables. As I
understand it, mathematica creates a store of all user defined symbols as a
list of replacement rules - so it "knows" which symbols are functions of
other symbols, and which are functions only of constants. What I was looking
for is a function that could work on each symbol's "replacement rules" in
such a way as to filter out those replacement rules which contain other
symbols.
I have never heard of DownValue before, I shall explore your b) suggestion
with interest.
Thanks for you help.
Paul.
-----Original Message-----
From: Jens-Peer Kuska [mailto:kuska at informatik.uni-leipzig.de]
Sent: 25 February 2009 09:01
To: mathgroup at smc.vnet.net
Subject: [mg96832] [mg96782] Re: listing user defined, independent variables
Hi,
a) what mean
"Mathematica must 'know' which variables
are functions of other symbols".
Variables functions of other symbols ?? what should that be ??
b) Start a fresh kernel and type
blub[x_] := Module[{y, z}, x]
and
Names["Global`*"] gives
{"blub", "x", "x$", "y", "y$", "z", "z$"}
The "*$" symbols come from the Module[] and have th attribute Temporary
and the "blub" function has an DownValue[]. Since x,y,z appear in the
down values of blub[] it is not possible to find out if there is also a
global symbol with a that has the name "x", "y" or "z".
Regards
Jens
Paul Ellsmore wrote:
> Hi,
>
>
>
> I have a notebook in which there are over 1300 variables (symbols)
defined.
> The vast majority of these are dependent variables. I can get a list of
them
> all with Names["Global`*"], but what I really want is a list of only the
> independent variables. Is there any obvious way to do this? Mathematica
must
> "know" which variables are functions of other symbols, so I was hoping
that
> there would be an "attribute" of a dependent variable that I could use as
a
> filter on Names[]. Any thoughts? I am using V5.1.
>
>
>
> Cheers,
>
>
>
> Paul
>
>
>
> Dr. Paul A. Ellsmore
>
>
>
> Nanion Limited
>
> Oxford Centre for Innovation
>
> Mill Street
>
> Oxford
>
> United Kingdom
>
> OX2 0JX
>
>
>
> Tel: +44 (0) 1865 811175
>
> Fax: +44 (0) 1865 248594
>
>
Prev by Date:
**Re: Counting Categories**
Next by Date:
**Re: Manipulating list of functions**
Previous by thread:
**Re: listing user defined, independent variables**
Next by thread:
**newbie: can't Manipulate ListPlot of recurrence**
| |