MathGroup Archive 2001

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

Search the Archive

Re: Newbie Plot-Fit Questions.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31122] Re: [mg31116] Newbie Plot-Fit Questions.
  • From: BobHanlon at aol.com
  • Date: Fri, 12 Oct 2001 03:36:39 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 2001/10/10 8:14:36 PM, realbeaux at yahoo.com writes:

>Please explain this to me:
>
>If I do the following:
>
>Fit[{{2942, 3650782}, {2955, 2255796}, {3204, 730421}, {4105,
>1740135}, {7815,
>       6329111}, {13097, 7116844}}, {1, x, x^2, x^3}, x]
>
>Results are:
>\!\(1.7044496230729986`*^7 - 8507.38287339198`\ x + 
>    1.3901134594316935`\ x\^2 - 0.00006096360495406324`\ x\^3\)
>
>Then I plot the results as follows:
>
>\!\(Plot[1.7044496230729986`*^7 - 8507.38287339198`\ x + 
>      1.3901134594316935`\ x\^2 - 0.00006096360495406324`\ x\^3, {x,
>2942,
>      13097}]\)
>
>I get a nice "sin" looking plot.  (This is what I want.)
>
>However if I try to combine the two statements into one.  Like this:
>
>Plot[(Fit[{{2942, 3650782}, {2955, 2255796}, {3204, 730421}, {4105, 
>          1740135}, {7815, 6329111}, {13097, 7116844}}, {1, x, x^2,
>x^3},
>      x]), {x, 2942, 13097}]
>
>I get a linear chart.  
>
>What is the difference?  And how do I get my nice "sin" looking plot
>back?
>
>As you can see, I an not really sure what is being plotted by the
>first set of commands, but I think it is a log plot.
>

non\[Hyphen]standard way...  You should use Evaluate to evaluate the function 
to be plotted if this can safely be done before specific numerical values are 
supplied."

Plot[Evaluate[
      Fit[{{2942,3650782},{2955,2255796},{3204,730421},{4105,1740135},{7815,
            6329111},{13097,7116844}},{1,x,x^2,x^3},x]], {x, 2942, 13097}];


Bob Hanlon
Chantilly, VA  USA


  • Prev by Date: Re: What variables are in a function and displaying surds
  • Next by Date: Re: What variables are in a function and displaying surds
  • Previous by thread: Re: Newbie Plot-Fit Questions.
  • Next by thread: Re: Newbie Plot-Fit Questions.