MathGroup Archive 1995

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

Search the Archive

Re: Mathematica conundrum


In article <DC96CK.EsK at wri.com>, Zorro <berriz at husc.harvard.edu> writes:
|> Hi.  When I issue the command
|> 
|>   Plot[Exp[-5x],{x, 0, 5}, PlotRange->{0,1}];
|> 
|> Mathematica produces the plot without a hitch.  Similarly, when I
|> issue
|> 
|>   Plot[Exp[-x],{x, 0, 5}];
|> 
|> Likewise, the command
|> 
|>   Plot[Evaluate[Table[Sin[n x],{n, 5}]],
|>        {x, 0, 1}, PlotRange->{-1, 1}];
|> 
|> produces, as expected, a series of superimposed sine waves.  BUT,
|> Mathematica balks at
|> 
|>   Plot[Evaluate[Table[Exp[-nx],{n, 5}]],
|>        {x, 0, 5}, PlotRange->{0, 1}];
|> 
|> spitting out
|> 
[...] 
|> Why is this?

Because you didn't put a space between the n and the x.
Mathematica thinks "nx" is the name of a single variable,
a variable for which no value is assigned.

Chris Grant
grant at math.byu.edu


  • Prev by Date: Re: Local Files with Remote Kernel
  • Next by Date: Re: Mathematica conundrum
  • Previous by thread: Re: Mathematica conundrum
  • Next by thread: Re: Mathematica conundrum