JuliaMath / JuliaMath/Interpolations.jl

Cubic spline interpolation for Vector Type x

Open
#588 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
575
Forks
117
PR merge metrics
No merged PRs in 30d

Description

```julia
julia> using Interpolations
# Plots

# Lower and higher bound of interval
a = 1.0
b = 10.0
# Interval definition
x = collect(a:1.0:b)
# This can be any sort of array data, as long as
# length(x) == length(y)
y = @. cos(x^2 / 9.0) # Function application by broadcasting
# Interpolations
itp_linear = linear_interpolation(x, y)
itp_cubic = cubic_spline_interpolation(x, y)
ERROR: MethodError: no method matching cubic_spline_interpolation(::Vector{Float64}, ::Vector{Float64})

Closest candidates are:
cubic_spline_interpolation(::Tuple{Vararg{AbstractRange, N}}, ::AbstractArray{T, N}; bc, extrapolation_bc) where {N, T}
@ Interpolations C:\Users\kong\.julia\packages\Interpolations\91PhN\src\convenience-constructors.jl:28
cubic_spline_interpolation(::AbstractRange, ::AbstractVector; bc, extrapolation_bc)
@ Interpolations C:\Users\kong\.julia\packages\Interpolations\91PhN\src\convenience-constructors.jl:11
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.