MathGroup Archive 1998

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

Search the Archive

Re: Plot, Cursor and Spelling Errors questions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg14437] Re: [mg14393] Plot, Cursor and Spelling Errors questions
  • From: Ranko Bojanic <bojanic at math.ohio-state.edu>
  • Date: Wed, 21 Oct 1998 03:32:33 -0400
  • Organization: Ohio State University
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Jens!

Thanks for the hint on how to turn off the spelling errors messages. As
far as the first question is concerned, you wrote:

> the answers are simple
> 1) Mathematica can't draw the difference because You typed P[x]
(CapitalP)
> but
>    you have only defined p[x_] (small p)
>    change Your last line to
> Plot[Evaluate[f[x]-p[x]], {x,-1, 1}, PlotPoints -> 50];
>   and all works fine.

P was a misprint in my letter, but not in the actual program. Did you
really run the program

n = 15;
f[x_] := Exp[x];
xLst = Table[Cos[((2*k - 1)*Pi)/(2*n)], {k, 1, n}]//Reverse; yLst =
N[Map[f,xLst], 30];
fLst = Transpose[{xLst, yLst}];
p[x_] := InterpolatingPolynomial[fLst, x]; Plot[Evaluate[f[x]-p[x]], {x,
-1, 1}, PlotPoints -> 50];

(with the last line corrected) and everything worked fine? Which
computer did you use? How did you configure Plot?

On my computer (Power Macintosh 7500/100, with Mathematica 30.1) this
program produces garbage.

Regards,
Ranko



  • Prev by Date: Re: FactorInteger
  • Next by Date: RE: Plot, Cursor and Spelling Errors questions
  • Previous by thread: RE: Plot, Cursor and Spelling Errors questions
  • Next by thread: Re: Re: Plot, Cursor and Spelling Errors questions