[z, s] = hw08p3data();

[b, c, d] = natspl(z, s);
fun = @(x) natsplfun2(z, s, b, c, d, x);

tol = 0.001;
z0 = bisec(fun, z(1), z(end), tol)
v0 = natsplfun(z, s, b, c, d, z0);

np = 100;
u = linspace(z(1), z(end), np);
v = natsplfun(z, s, b, c, d, u);

plot(u, v, '-');
hold on
plot(z0, v0, 'ro');
plot(z, s, 'ko');
grid on