In [1]:
Pkg.checkout("MyinterpolationA")


INFO: Checking out MyinterpolationA master...
INFO: Pulling MyinterpolationA latest master...
INFO: No packages to install, update or remove

In [2]:
using MyinterpolationA

In [3]:
grid = [1, 2]
vals = [2, 0]
f = myinterpolationA(grid, vals)

f(1.25)
# 1.5 が返ってくるはず


Out[3]:
1.5

In [4]:
Pkg.test("MyinterpolationA")


INFO: Testing MyinterpolationA
Test Summary:                | Pass  Total
  Testing linear interporation |   13     13
INFO: MyinterpolationA tests passed

In [5]:
using Plots


WARNING: using Plots.grid in module Main conflicts with an existing identifier.

In [6]:
plotly()


Out[6]:
Plots.PlotlyBackend()

In [7]:
x = -7:7
y = sin.(x)

xf = -7:0.1:7
plot(xf, sin.(xf), label= "sine function")
scatter!(x, y, label="sampled data", markersize=4)


Out[7]:

In [8]:
li = myinterpolationA(x, y)
y_linear_qe = li.(xf)

plot(xf, y_linear_qe, label = "linear")
scatter!(x, y, label="sampled data", markersize=4)


Out[8]:

In [ ]:


In [ ]: