MathGroup Archive 2001

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

Search the Archive

Re: Newbie Plot-Fit Questions.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31126] Re: Newbie Plot-Fit Questions.
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 12 Oct 2001 03:36:43 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9q2l22$p4d$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Plot[] has the attribute HoldAll and you have to enclose
an argument by Evaluate[] if you wish to evaluate it  and

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}]

work as expected.

Regards
  Jens

SkyBeaux wrote:
> 
> 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.
> 
> Thanks for you help.
> 
> --SB


  • Prev by Date: Re: What variables are in a function and displaying surds
  • Next by Date: Date and Time in Headers (odd quirk)
  • Previous by thread: Re: Newbie Plot-Fit Questions.
  • Next by thread: RE: Newbie Plot-Fit Questions.