Re: Spline
- To: mathgroup at smc.vnet.net
- Subject: [mg58289] Re: [mg58281] Spline
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sun, 26 Jun 2005 01:33:51 -0400 (EDT)
- Reply-to: hanlonr at cox.net
- Sender: owner-wri-mathgroup at wolfram.com
Needs["Graphics`"]; damprat={ 0.014997649179748,0.054098060220146,0.104209568084688, 0.145267085272089,0.160493044616599,0.145267084912456, 0.104209571529220,0.054098058877509,0.014997649185286, 0}; dat=Range[0.1,1,0.1]; data1=Prepend[Table[{dat[[s]],damprat[[s]]*10/s}, {s,Length[dat]}],{0,0}]; spline=SplineFit[data1,Cubic]; ParametricPlot[spline[u],{u,0,10}, PlotRange->{0,0.4},Ticks->{dat,Automatic}]; Bob Hanlon > > From: Pratik Desai <pdesai1 at umbc.edu> To: mathgroup at smc.vnet.net > Date: 2005/06/25 Sat AM 01:56:49 EDT > Subject: [mg58289] [mg58281] Spline > > 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 > > -- > > Pratik Desai > Graduate Student > UMBC > Department of Mechanical Engineering > Phone: 410 455 8134 > > >