In [2]:
import numpy as np
from matplotlib import pyplot as plt
%matplotlib inline
In [4]:
def f0(x):
return x
def f1(x):
return 1
f = np.array([[f0], [f1]])
def F(C, x):
ans = 0
for i in range(C.shape[0]):
ans += C[i] * f[i](x)
return ans
In [5]:
C = np.array([1, 0])
x = np.linspace(0, 10, 100)
y = F(C, x)
In [ ]: