How to use piecewise quadratic interpolation? I'm attempting to get the hang of quadratic interpolation, in MatLab specifically, and I'm having trouble approaching the process of actually creating the spline equations.
For example, I have 9 points that need to be interpolated, so I'll need 8 equations for the whole curve. I have the points that I'll be using in $(x,y)$ coordinates, so I just need to figure out how to take those points and create the equations.
I've been given the following equations to create said splines, but I'm confused as how to solve for $Q$ and $z$ in the following:
$$ Q_i(x) = \frac{z_{i+1}-z_i}{2(t_{i+1}-t_i)}(x-t_i)^2
 + z_i(x-t_i) + y_i
$$
$$ z_i = Q'(t_i), z_{i+1} = -z_i + 2\frac{y_{i+1}-y_i}{t_{i+1}-t_i}
$$
Mostly because it looks to me like $Q$ and $z$ are both dependent on the other. I'm hoping to get some guidance on this so I create the splines and ultimately the curve correctly.
 A: Usually the equations look like this (for example with the following set of points): 
Points:
$P_0(-1.5|-1.2); P_1(-0.2|0); P_2(1|0.5); P_3(5|1); P_4(10|1.2)$
Equation:
$$f(x) = \begin{cases}-7.4882 \cdot 10^{-2}\cdot x^3 + -3.3697 \cdot 10^{-1}\cdot x^2 + 5.4417 \cdot 10^{-1}\cdot x + 1.2171 \cdot 10^{-1}, & \text{if } x \in [-1.5,-0.2], \\6.7457 \cdot 10^{-2}\cdot x^3 + -2.5157 \cdot 10^{-1}\cdot x^2 + 5.6125 \cdot 10^{-1}\cdot x + 1.2285 \cdot 10^{-1}, & \text{if } x \in [-0.2,1], \\3.8299 \cdot 10^{-3}\cdot x^3 + -6.0683 \cdot 10^{-2}\cdot x^2 + 3.7037 \cdot 10^{-1}\cdot x + 1.8648 \cdot 10^{-1}, & \text{if } x \in [1,5], \\2.1565 \cdot 10^{-4}\cdot x^3 + -6.4695 \cdot 10^{-3}\cdot x^2 + 9.9304 \cdot 10^{-2}\cdot x + 6.3826 \cdot 10^{-1}, & \text{if } x \in [5,10].\end{cases}$$
I have written a web tool that performs a cubic inteprolation and my approach was to calculate the coefficients by solving a matrix using the gaussian elimination. The matrix is filled like shown in that document on page 17. I had to write it in German  unfortunately (was for school) but the matrix might help you anyway.
