MathGroup Archive 2005

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

Search the Archive

Re: Why won't Horner[] work?


    << Algebra`Horner`
    Horner[Fit[{{1, 200}, {200, 0}, {400, 200}}, {1, x, x^2}, x], x]
    202.01 + (-2.01508 + 0.00502513 x) x

Note the required second argument, x, to Horner to indicate the variable!


Paul McHale wrote:
> When I issue the command:
> 
> In:= Fit[ {{1,200},{200,0},{400,200}}, {1,x,x^2}, x]
> 
> Out:= 202.01 - 2.01508 x + 0.00502513 x^2
> 
> This seems good.  But when I do
> 
> 
> In:= Horner[Fit[ {{1,200},{200,0},{400,200}}, {1,x,x^2}, x]]
> 
> Out:= Horner[202.01 - 2.01508 x + 0.00502513 x^2]
> 
> 
> Why doesn't it evaluate the polynomial?  To I need to convert the
> output of fit?
> 
> Thanks,
> Paul
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Showing Mathematica notebooks within Firefox browser (like Adobe PDF's)
  • Next by Date: Re: Re: Re: Casting a Command as a String
  • Previous by thread: Why won't Horner[] work?
  • Next by thread: Re: Why won't Horner[] work?