MathGroup Archive 1997

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

Search the Archive

Re: Release question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9409] Re: [mg9366] Release question
  • From: Olivier Gerard <jacquesg at pratique.fr>
  • Date: Wed, 5 Nov 1997 01:56:28 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Peter,

Plot treats the first argument (the functions) in a special way : it is
not evaluated ("hold") and it is tentatively compiled before any point
computation takes place.

Each time you give to Plot an argument which is not in the final form
for calculating the points (for example a Table instruction, or
something with a rule transformation to apply), you must explicitely
evaluate it before. One way is to use Release as you did, the most
common way is to use Evaluate. Taking your example:

    Plot[ {V[x], Phi[x] /. min} // Evaluate, {x,-5,5} ]

works too.
this "Hold" behavior is a design decision since the first...release of
Mathematica.


Olivier


At 10:33 +0200 97.11.01, Peter wrote:
> Hi Mathgroup,
>
> I was trying to Plot:
>
>    Plot[ {V[x], Phi[x] /. min}, {x,-5,5} ]
>
> where min was a set of rules:
>
>   min = {a->.5, b->.005}
>
> Mathematica was literally trying to plot  "Phi /. min", which of course
> is meaningless.
>
> Thumbing through a book I have, I stumbled across the Release command.
> This did work:
>
>     Plot[ Release[{V[x], Phi[x] /. min}], {x,-5,5}]
>
> I couldn't quite understand the explanation why Release is necessary.
> Even though my problem is solved, can someone explain precisely why
> Release is necessary here and what it does?
>
> Thanks!
> Peter
>




  • Prev by Date: Modifying Initial Path Setting
  • Next by Date: Re: linking C-program with Mathematica
  • Previous by thread: Release question
  • Next by thread: Re: Release question