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
Copy file name to clipboardExpand all lines: docs/src/control.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,15 @@ Af = [a for a in A if !ismissing(a)]
123
123
itp =interpolate((xf, ), Af, Gridded(Linear()))
124
124
```
125
125
126
+
In-place gridded interpolation is also possible:
127
+
```julia
128
+
x =1:4
129
+
y =view(rand(4), :)
130
+
itp =interpolate!((x,), y, Gridded(Linear()))
131
+
y .=0
132
+
@showitp(2.5) # 0
133
+
```
134
+
126
135
## Parametric splines
127
136
128
137
Given a set a knots with coordinates `x(t)` and `y(t)`, a parametric spline `S(t) = (x(t),y(t))` parametrized by `t in [0,1]` can be constructed with the following code adapted from a [post](http://julia-programming-language.2336112.n4.nabble.com/Parametric-splines-td37794.html#a37818) by Tomas Lycken:
Copy file name to clipboardExpand all lines: test/io.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ using Test
51
51
summary(itp) =="8×20 interpolate((::Array{Int64,1},::Array{Float64,1}), ::Array{Float64,2}, (Gridded(Linear()), Gridded(Constant{Nearest}()))) with element type Float64"
52
52
53
53
# issue #260
54
-
A =(1:4)/4
54
+
A =collect((1:4)/4)
55
55
itp =interpolate((range(0.0, stop=0.3, length=4),), A, Gridded(Linear()))
0 commit comments