Re: Spline
- To: mathgroup at smc.vnet.net
- Subject: [mg58288] Re: Spline
- From: Peter Pein <petsie at dordos.net>
- Date: Sun, 26 Jun 2005 01:33:50 -0400 (EDT)
- References: <d9it0o$crk$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Pratik Desai schrieb: > Hi > I am trying to fit a spline through a data set ranging in value 0 to1 > incremented by step size 0.1 (i.e the "x-axis" }, shown below. I have > information for points 0.1 to 0.9 in damprat. I know at point 0 and 1 > the values for damprat is zero. Now for presentation reasons I want the > curve to pass through the points (0,0) and {1,0). Is there a way for the > spline to be extended through those points. Any suggestions would be > greatly appreciated > > << Graphics`Spline` > damprat = {0.014997649179748, 0.054098060220146, 0.104209568084688, \ > 0.145267085272089, 0.160493044616599, 0.145267084912456, > 0.104209571529220, \ > 0.054098058877509, 0.014997649185286} > dat = Range[0.1, 0.9, 0.1] > data1 = Table[{dat[[s]], damprat[[s]]*10/s}, {s, 1, Length[ > dat]}] (*The dataset i am interested in fitting a spline through*) > spline = SplineFit[data1, Cubic] > ParametricPlot[spline[u], { > u, 0, 8}, Compiled -> > True, PlotRange -> {0, 0.4}, Ticks -> {dat, Automatic}] > > Thanks > > Pratik > Is this << "Graphics`Spline`" damprat = {0.014997649179748, 0.054098060220146, 0.104209568084688, 0.145267085272089, 0.160493044616599, 0.145267084912456, 0.10420957152922, 0.054098058877509, 0.014997649185286, 0}; data1 = Prepend[Transpose[ {0.1*Range[10], 10*(damprat/Range[10])}], {0, 0}]; spline = SplineFit[data1, Cubic]; ParametricPlot[spline[u], {u, 0, 10}, PlotRange -> {0, 0.4}, Ticks -> {0.1*Range[10], Automatic}]; acceptable? -- Peter Pein Berlin