Question: Fit the following data using a Cubic spline using natural boundary conditions You will do this by setting up the matrix equation as Ax =

Fit the following data using a Cubic spline using natural boundary conditions
You will do this by setting up the matrix equation as
Ax=bAx=b
. You can use numpy arrays to set up
AA
and
bb
. Now
bb
= np.array corrects a row vector. To change this to a column vector you need to do the following
bb
=
bb
[:, np.newaxis]. Now the matrix equation looks just like we set up in the lecture.
Next, you will use np.dot(np.linalg.inv(
AA
),
bb
). I am using the short name np for numpy. What this routine does is first find the inverse of
AA
, and then take the dot product of each row of the inverse of
AA
with the column vector
bb
. In essence, doing the matrix-vector multiply. So, this one command calls two functions. Look this up so you get a better understanding of this routine.hjb
Saturn 5 Rocket Launch Data
x (time in minutes)
y (velocity in 1000 ft per second
0
1
1
2
2.5
9
3
9.2
4
10
5
12
6
14.5
7
17
8
20
8.75
23
9
23.5
10
24
11
25.5
11.25
25.9
11.5
25.9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!