%%
figure
hold on
x=[0 1 3];
y=[0 3 1]

plot(x,y,'*','MarkerSize',10,'LineWidth',2)
hold on

S=splinemat2(x);
plotspline2(x,y)

cond(S)

%%
figure
hold on
x=[0 1 3]+100;
y=[0 3 1]

plot(x,y,'*')
hold on

S=splinemat2(x);
plotspline2(x,y)

cond(S)

%%
figure
n=500;
x=5*sort(rand(1,n));
y=randn(1,n);

plot(x,y,'*')
hold on

S=splinemat2(x);
plotspline2(x,y)

cond(S)