Mercurial > repos > public > sbplib
view +parametrization/dataSpline.m @ 1337:bf2554f1825d feature/D2_boundary_opt
Add periodic D1 and D2 operators for orders 8,10,12
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 13 May 2022 13:28:10 +0200 |
parents | 60c875c18de3 |
children |
line wrap: on
line source
% dataSpline calculates a Curve through the points f_i using cubic spline interpolation. % The spline curve is parametrized with the arc length parametrization % to facilitate better grids. % % f - m x D matrix of m points in D dimensions function C = dataSpline(f) m = size(f, 1); t = linspace(0,1,m); pp_g = spapi(4, t, f'); pp_gp = fnder(pp_g); g = @(t) fnval(pp_g, t); gp = @(t) fnval(pp_gp, t); C = parametrization.Curve(g, gp); C = C.arcLengthParametrization(); end