MathGroup Archive 2003

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

Search the Archive

Re: I need some help about this error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39314] Re: [mg39305] I need some help about this error
  • From: "milkcart" <milkcart at m17.alpha-net.ne.jp>
  • Date: Tue, 11 Feb 2003 04:41:12 -0500 (EST)
  • References: <200302100608.BAA23852@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Plot have property of  HoldAll

In[58]:=
Attributes[Plot]
Out[58]=
{HoldAll, Protected}

So if you plot t={2x+1,-2x+3} with the next sentence,

t={2x+1,2x-3};
Plot[t,{1,2}]

error is returned. Plot uses to number 1 to evaluate "t".
But t is not a list of function, but only a letter. This happens
because of the Plot's property of HoldAll. Mathematica 
regard t as a letter "t", not a list of functions {2x+1,2x-3}

You can have mathematica know "t" as a list of function,
by using Evaluate in a Plot command.

t={2x+1,2x-3};
Plot[Evaluate[t], {x,1,2}] 

Help of Plot  and A4.2 might be useful to you.

************
milkcart
milkcart at m17.alpha-net.ne.jp









  • Prev by Date: Re: Simplify[Abs[x],x<0]]
  • Next by Date: RE: Simplify[Abs[x],x<0]]
  • Previous by thread: I need some help about this error
  • Next by thread: Re: I need some help about this error