Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Graphing, Symbolic Manipulation, and Regressions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25568] Re: [mg25523] Graphing, Symbolic Manipulation, and Regressions
  • From: BobHanlon at aol.com
  • Date: Sat, 7 Oct 2000 03:36:16 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

In a message dated 10/6/2000 12:46:02 AM, ian at v-wave.com writes:

>Hello, can anyone please help me by telling me how to graph more than one
>function on the same graph; and also how I would go about graphing "non
>functions", ex. graphing y= +/-Sqrt[x].
>
>Also, is there any way to be able to just *show* the function that I input?
>ex. (x(x + 2))/x^2 that would come out as:
>
> x(x + 2)
>---------
>   x^2
>
>instead of the simplified form:
>
> 2 + x
>-------
>    x
>
>Lastly, how would I go about doing regressions? I tried reading the help
>files but it did not help me much. For example, if I want to find the
>formula for the quadratic equation with the points (1, 3), (-1, -3), (2,
>6)
>what command would I put in?
>

Plot[{Sqrt[x], -Sqrt[x]}, {x, 0, 16}, PlotStyle -> RGBColor[0, 0, 1]];

HoldForm[(x(x + 2))/x^2]

\!\(\*
  TagBox[\(\(x\ \((x + 2)\)\)\/x\^2\),
    HoldForm]\)

Needs["Statistics`NonlinearFit`"]

data = {{1, 3}, {-1, -3}, {2, 6}};
model = a*x^2 + b*x + c;
vars = x;
params = {a, b, c};

NonlinearFit[data, model, vars, params] // Chop

3. x

And @@ ((3x == y /. {x -> #[[1]], y -> #[[2]]}) & /@ data)

True


Bob Hanlon


  • Prev by Date: Re: Q: FastBinaryFiles-package: how to detect EndOfFile?
  • Next by Date: RE:? D[f,{x,n}]
  • Previous by thread: Graphing, Symbolic Manipulation, and Regressions
  • Next by thread: Re: Graphing, Symbolic Manipulation, and Regressions