With package DataInterpolations
– is it possible to add data after I have created an interpolation function? Example:
u = [1,2,3,4,5]
t = [0,0.5,1,2,4]
f = ConstantInterpolation(u,t)
Suppose I pass function f
to some function, and then want to add a data point to f
when u
and t
are not available.
Question: Can I extract u
and t
from f
, add the data point to the extracted u
and t
, and construct the new interpolation function?
Something like:
u,t = extract(f)
push!(u,2)
push!(t,8)
f = ConstantInterpolation(u,t)
[I looked for fieldnames in `f`, without success…]