You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using MonotonicSplines
w = [0.0, 0.15, 0.20, 0.45, 0.65, 0.80, 1.0]
h = [0.0, 0.10, 0.25, 0.40, 0.55, 0.70, 1.0]
d = [0.5, 1.3, 0.8, 0.9, 0.7, 1.2, 1.1]
X = collect((0:0.1:1)')
n = length(X)
M = fill(1.0, 1, 1, n)
f = RQSpline(w .* M, h .* M, d .* M)
inv_f = InvRQSpline(w .* M, h .* M, d .* M)
Y = f(X)
X2 = inv_f(Y)
we currently get
julia> X ≈ X2
false
julia> X
1×11 Matrix{Float64}:0.00.10.20.30.40.50.60.70.80.91.0
julia> X2
1×11 Matrix{Float64}:0.00.10.20.30.40.50.60.70.80.852831.0
but when adding a spline node at (1.1, 1.1)
w = [0.0, 0.15, 0.20, 0.45, 0.65, 0.80, 1.0, 1.1]
h = [0.0, 0.10, 0.25, 0.40, 0.55, 0.70, 1.0, 1.1]
d = [0.5, 1.3, 0.8, 0.9, 0.7, 1.2, 1.1, 0.9]
X =collect((0:0.1:1.1)')
n =length(X)
M =fill(1.0, 1, 1, n)
f =RQSpline(w .* M, h .* M, d .* M)
inv_f =InvRQSpline(w .* M, h .* M, d .* M)
all is correct:
julia> X ≈ X2
true
The text was updated successfully, but these errors were encountered:
With
we currently get
but when adding a spline node at (1.1, 1.1)
all is correct:
The text was updated successfully, but these errors were encountered: