MathGroup Archive 2008

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

Search the Archive

Re: Mathematica Help Urgent (Very New Beginner)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93389] Re: Mathematica Help Urgent (Very New Beginner)
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Wed, 5 Nov 2008 04:57:35 -0500 (EST)
  • References: <gepavq$se3$1@smc.vnet.net>

Derek wrote:
> I am just beginning to learn to use Mathematica, and need to create a table of values. I would like to be able to input x-values and have the table display f(x), f'(x), and possibly f''(x) for a given function. I have already specified the function, and I have found the following input creates tables:
> 
> Table[{x,f[x]},{x,-5,5,.5}]
> 
> My problem is this: I would like to input specifc x-values, rather than use set intervals as defined in {x,-5,5,.5} above. Is there a way to specify a list of specific x values so that Mathematica computes the values of f[x] in table form?
> 
> Any help would be greatly, greatly appreciated. Thanks.
> 

Use the Map function - Table is meant for uniform intervals:

Map[f,{3.1,5.7,8.2,2.1}]

The fact that this and similar questions get asked here, makes me 
question the effectiveness of the current all-electronic documentation. 
I know this has been debated a lot, but I still think leafing through a 
real book (if it still existed) would prevent new users getting stuck 
like this.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: Boundary problem with parameter using NDSolve
  • Next by Date: Re: Constructing a Label
  • Previous by thread: Re: Mathematica Help Urgent (Very New Beginner)
  • Next by thread: Re: Mathematica Help Urgent (Very New Beginner)