Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7015

Re: Evaluate[expr]

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Evaluate[expr]
Date 2011-12-08 10:28 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jbq3h1$ilt$1@smc.vnet.net> (permalink)
References <201112071114.GAA04233@smc.vnet.net>

Show all headers | View raw


It doesn't work without Evaluate because:

Attributes@Table

{HoldAll, Protected}

HoldAll prevents arguments being evaluated (unless you include Evaluate)  
until too late in Table's evaluation. When x has a value -- the definition  
of too late in this case -- D[f[x], x] makes no sense. When x is 0., for  
instance:

D[f[0.], 0.]

\!\(
\*SubscriptBox[\(\[PartialD]\), \(0.`\)]1.`\)

General::ivar: 0.` is not a valid variable. >>

Bobby

On Wed, 07 Dec 2011 05:14:45 -0600, 道 厚 <shlwell1988@gmail.com> wrote:

> f[x_] = x^5 - 3 x^2 + 1; tt =
>  Table[Evaluate[{{x}, f[x], D[f[x], x]}], {x, 0, 2, 0.3}]
>
> In the above expression , what's the function of Evaluate[expr]?
>
> Why doesn't it work without Evaluate[expr]?
>
> Can you help me?
>


-- 
DrMajorBob@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Evaluate[expr] DrMajorBob <btreat1@austin.rr.com> - 2011-12-08 10:28 +0000

csiph-web