Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*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 2004

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

Search the Archive

Re: [Splines] Defining piecewise functions over a variable number of intervals

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52738] Re: [mg52692] [Splines] Defining piecewise functions over a variable number of intervals
  • From: Christopher Purcell <christopherpurcell at mac.com>
  • Date: Sat, 11 Dec 2004 05:21:55 -0500 (EST)
  • References: <200412100122.UAA18900@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Unless you are doing something quite peculiar, the built-in 
Interpolation and ListInterpolation routines will probably suffice. 
With a little extra work, they can handle vector as well as scalar 
input data and they shield you from having to deal with the piecewise 
construction.


Dr Christopher Purcell
Sensors & Actuators Group
DRDC-Atlantic, 9 Grove St., PO Box 1012,
Dartmouth NS B2Y 3Z7 Canada
Work E-mail chris.purcell at drdc-rddc.gc.ca
Work Tel 902-426-3100 x389 Fax 902-426-9654
Home Tel 902-464-9248
Home E-mail christopherpurcell at mac.com
AIM/iChatAV:   cffrc

On Dec 9, 2004, at 9:22 PM, m0NoiD wrote:

> I know you can define a function piecewise with If[] statements, and
> even better with Which[].  I am wondering if there is a way to
> construct a piecewise function when the number of intervals is not
> known in advance.
>
> I am trying to find a way to compute cubic splines for any number of
> data points.  The data points will be the input.  Then it will compute
> the coefficients of the polynomials.
>
> The thing I then need is a subroutine which will take any number of
> coefficients as input and construct piecewise cubic polynomials.
>
> I am looking for the most efficient way to do this.  I am guessing it
> will require some sort of pattern matching, but I am not sure so that
> is why I need help.
>
> Thank you,
>
> Steve
>


  • Prev by Date: Bug in 5.1,Linux, GUIKit?
  • Next by Date: Re: Re: Needed Grid lines in Implicit Plot
  • Previous by thread: [Splines] Defining piecewise functions over a variable number of intervals
  • Next by thread: Re: [Splines] Defining piecewise functions over a variable number of intervals