MathGroup Archive 2002

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

Search the Archive

Re: A Learning TableForm Problem

  • To: mathgroup at
  • Subject: [mg32860] Re: A Learning TableForm Problem
  • From: "Allan Hayes" <hay at>
  • Date: Sat, 16 Feb 2002 04:35:16 -0500 (EST)
  • References: <a4ielo$9ng$>
  • Sender: owner-wri-mathgroup at

If you  use -> for the right arrow everything works:

    f[x_] := x^3 - 4x^2 - 2x + 8
    TableForm[Table[{i, f[i]}, {i, 1, 2, 0.1}],
          TableHeadings -> {None, {"x", "f(x)"}}]

This is the universal "InputForm" that you can input from any keyboard
(like, for example a^b for a to the power b).
You would find it helpful to read the first part of the Mathematica book -
you can find this in the Help menu.

Remember that the tabel form is for display. If you want to use the list
generated by  Table[...] in later calulations please be aware of the

   f[x_] := x^3 - 4x^2 - 2x + 8
    tbf = TableForm[lst = Table[{i, f[i]},
      {i, 1, 2, 0.1}], TableHeadings ->
     {None, {"x", "f(x)"}}]

    % (*previous output - this is a comment, not part of the input*)



We see below that tbf is % or lst with the "Wrapprer" TableForm[...] wrapped
round it to specify how it is to be displayed.


Of course we can extract lst from tbf:



Allan Hayes
Mathematica Training and Consulting
Leicester UK
hay at
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565

"Carlos" <k9zm at> wrote in message
news:a4ielo$9ng$1 at
> I need to know why this isn't working for me.  The example I am given is:
> Find an estimate for the zero of the Polynomial.  f(x)=x^3-4x^2-2x+8
> On a graph the estimated zero is between (1,2)   and it asks us to divide
> the interval into tenths
> f[x_]:=x^3-4x^2-2x+8
> TableForm[Table[{i,f[i]},{i,1,2,0.1}],
> TableHeadings>{None,{"x","f(x)"}}]
> The > is as close as I can get to a right arrow sign
> The example I have shows a table  with 2 columns and appropriate numbers,
> but I cannot get this to display on Mathematica for me.  Any ideas?
> Thanks
> Carlos

  • Prev by Date: Re: Very urgent problem...PLEASE help me!
  • Next by Date: Re: Generate expression from result
  • Previous by thread: RE: A Learning TableForm Problem
  • Next by thread: not scalable graphics