Re: BSpline function
- To: mathgroup at smc.vnet.net
- Subject: [mg112827] Re: BSpline function
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Sat, 2 Oct 2010 05:44:50 -0400 (EDT)
pts = {{0.3, 0.74152}, {0.4, 0.650256}, {0.5, 0.588225}, {0.6, 0.541167}, {0.8, 0.473432}, {1., 0.425661}, {1.022, 0.42067}, {1.25, 0.380029}, {1.5, 0.346518}, {2., 0.300173}, {2.044, 0.297321}}; f = BSplineFunction[pts, SplineDegree -> 5]; ParametricPlot[f[t], {t, 0, 1}] Clear[g] g[t_?NumericQ] := f[t][[1]] NMinimize[{Abs[g[t] - 0.9], 0 < t < 1}, t][[2]] {t -> 0.430445} FindRoot[g[t] == 0.9, {t, .4}] {t -> 0.430445} f[t] /. % {0.9, 0.450758} Bob Hanlon ---- eric g <eric.phys at gmail.com> wrote: ============= hello Group, I want to find the parameter of the spline function @ x=.9 in order to find the appropriate value of y? I can eye ball it using Table [{t,f[t]},{t,0,1,.01}] but I would like to get it straihgt... Also I would like to know what is the appropriate Spline-degree I should use? thnks in advance, Eric pts={{0.3, 0.74152}, {0.4, 0.650256}, {0.5, 0.588225}, {0.6, 0.541167}, {0.8, 0.473432}, {1., 0.425661}, {1.022, 0.42067}, {1.25, 0.380029}, {1.5, 0.346518}, {2., 0.300173}, {2.044, 0.297321}}; f= BSplineFunction[pts,SplineDegree->5]; f[?]={0.9,?}