Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

RE: Re: Why do two equivalent expression give different answers?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47420] RE: [mg47409] Re: Why do two equivalent expression give different answers?
  • From: "kimsj" <kimsj at mobile.snu.ac.kr>
  • Date: Sun, 11 Apr 2004 04:44:00 -0400 (EDT)
  • Organization: SAIT
  • Reply-to: <kimsj at mobile.snu.ac.kr>
  • Sender: owner-wri-mathgroup at wolfram.com

> Plot evaluates its arguments in a non-standard way (see Section A.4.2).
This attempts me to understand like that we may use some functions having
the arguments that is no need to be evaluated in a standard way. Is my
understanding is correct? If yes, please let me know, then, how to do it?

Br,
- James Sungjin Kim (kimsj at mobile.snu.ac.kr) 

-----Original Message-----
From: Adam Smith [mailto:adam.smith at hillsdale.edu] 
To: mathgroup at smc.vnet.net
Subject: [mg47420] [mg47409] Re: Why do two equivalent expression give different
answers?

The difficulty is related to the statement in the Help under Plot
which states:

   Plot evaluates its arguments in a non­standard way (see Section
A.4.2). You
should use Evaluate to evaluate the function to be plotted if this can
safely be done before specific numerical values are supplied.

Your first example will work as desired by putting the Table command
inside of Evaluate[]:

Plot[ Evaluate[ Table[t^c,{c,1,2}]],{t,0.5,1.2}]

Evaluate is not needed in your second example becuase the two function
t and t^2 are simple functions of the plotting variable t.  The basic
rule that I use with Plot is to include the Evaluate[] command any
time the thing I want to plot is any sort of "complicated" function. 
The use of Evaluate[] may be redundant in some cases, but it should
not cause any problems.

Adam Smith

chamster at home.se (Konrad Den Ende) wrote in message
news:<c527dc$dtu$1 at smc.vnet.net>...
> I started Mathematica and went:
> 
> 
> Plot[
> Table[t^c, {c, 1, 2}],
> {t,0.5, 1.2} ]
> but it didn't like it.
> 
> So i computed Table[t^c, {c, 1, 4}] explicitly in an other cell and then
> pasted the result into the expression as follows
> Plot[
> {t,t^2},
> {t,0.5, 1.2} ]
> and then it went well.
> 
> So i have two wonderings.
> a) How come there's a difference?!
> b) How do i make Mathematica accept what i try to do?
> 
> -- 
> 
> Kindly
> Konrad
> ---------------------------------------------------
> May all spammers die an agonizing death; have no burial places;
> their souls be chased by demons in Gehenna from one room to
> another for all eternity and more.
> 
> Sleep - thing used by ineffective people
>             as a substitute for coffee
> 
> Ambition - a poor excuse for not having
>                  enough sense to be lazy
> ---------------------------------------------------



  • Prev by Date: RE: Re: problems with FindRoot: what worked with 4.2 does not work with 5.0
  • Next by Date: Re: All combinations
  • Previous by thread: Re: Why do two equivalent expression give different answers?
  • Next by thread: Plot Rendering