Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Re: variable "K"? (Really strange behavior . . . )

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69228] Re: [mg69182] Re: variable "K"? (Really strange behavior . . . )
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sun, 3 Sep 2006 01:39:19 -0400 (EDT)
  • References: <ed6918$jho$1@smc.vnet.net> <200609011041.GAA25571@smc.vnet.net> <acbec1a40609010800w611c1bc2h322f089ea527b535@mail.gmail.com> <p06230912c11e554a0a45@171.66.188.107>
  • Sender: owner-wri-mathgroup at wolfram.com

I'm not sure if this will work properly, but the first time you use K
in a notebook, you could type Global`K. Giving the full context should
force the creation of K. Also, as long as Global occurs sooner in the
context path than System (and I think that's true), then your method
should work. (I think)

By the way, your description of the way notebooks should operate
sounded really ... futuristic?? almost like one notebook doing the job
of what several files in a file system currently do. I wanted to say
that Some of the functionality you desire is available through the use
of XML - specifically its output functionality to multiple standard
file formats. The cool thing is, with a little make or ant scripting,
generation may be done automatically.

Anyway, here are some possibilities.

http://chris.chiasson.name/temp/AES/Engineering_Optimization.pdf

http://chris.chiasson.name/temp/AES/Engineering_Optimization.html

(*if your browser has MathML capability and the right fonts, try the one below*)
http://chris.chiasson.name/temp/AES/Engineering_Optimization.xhtml

here is the XML (use save as text to read it)

http://chris.chiasson.name/temp/AES/Engineering_Optimization.xml

Note this was all an updated version of:
http://chris.chiasson.name/Engineering_Optimization/ch01.html

On 9/1/06, AES <siegman at stanford.edu> wrote:
> At 10:00 AM -0500 9/1/06, Chris Chiasson wrote:
> >They probably didn't protect K because it is usually only associated
> >with some type of automatic output - such as an integration dummy
> >variable. Even then, it usually appears in a unique form like K$12312.
> >I think it would be okay for you to assign K a value if you wanted to.
>
> Oh, you can assign a value to K all right, and it seems to function
> just fine as a "normal" Mathematica variable or symbol.
>
> The problem arises if it's your practice (as it is mine) to start
> your notebooks with Remove["Global`*"] as the first Input cell, and
> then define various functions and modules in the immediately
> following cells, carefully avoiding assigning any numerical values to
> any symbols or parameters in those functions and modules until after
> all those definitions have all been completed.
>
> Many of the symbols or parameters in those functions or modules will,
> of course be given numerical values further down in the notebook,
> when you run specific cases, but starting the notebook with
> Remove["Global`*"]  means (or *should* mean) that if you run the
> notebook once, then re-run it from the top, the initial functions and
> modules will not be contaminated by numerical values assigned in the
> previous run.
>
> The problem is, K is apparently *not* cleared out by
> Remove["Global`*"], and no warning of this is given; and hence if
> you've used K as a variable in these initial definitions, the value
> of K from the previous run is "hard-wired" into the initial
> definitions on the following run -- whether that's what you intended
> or not.
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: Problems with NMaximize.
  • Next by Date: Re: Re: Re: generalized foldlist problem - part 2
  • Previous by thread: Re: Re: variable "K"? (Really strange behavior . . . )
  • Next by thread: Re: Re: variable "K"? (Really strange behavior . . . )