Skip to content

Bsplines seem slightly broken #419

@oscardssmith

Description

@oscardssmith
julia> using DataInterpolations, Plots
julia> using DataInterpolations: derivative
julia> u = [2.0, 1.0, 5.0, 4.0, 5.0, 4.0]
julia> t = [0.0, 2.0, 3.5, 4.0, 5.0, 6.5]
julia> bspline = BSplineInterpolation(u, t, 0, :Uniform, :Uniform; extrapolation_left=ExtrapolationType.Extension,  extrapolation_right=ExtrapolationType.Extension)
julia> plot(bspline)

Image
Why isn't this matching ConstantInterpolation (e.g. having discontinuities at the data points)

For extra weirdness:

bspline = BSplineInterpolation(u, t, 2, :Uniform, :Uniform; extrapolation_left=ExtrapolationType.Extension,  extrapolation_right=ExtrapolationType.Extension)
plot(t->derivative(bspline, t))

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions