From: Matt Dunham on
Hello, I'm trying to make a simple 3d surf plot of linear splines, (not cubic) fit to random data. I have the spline toolbox, but any solution will work.

The matlab spine toolbox has this demo code:

fnplt( spmak({augknt(0:4,4),augknt(0:4,3)}, rand(7,8)) )

Although close to what I want, it generates cubic splines not linear.

Thanks
From: John D'Errico on
"Matt Dunham" <mattdunham(a)yahoo.com> wrote in message <hqstds$i7t$1(a)fred.mathworks.com>...
> Hello, I'm trying to make a simple 3d surf plot of linear splines, (not cubic) fit to random data. I have the spline toolbox, but any solution will work.
>
> The matlab spine toolbox has this demo code:
>
> fnplt( spmak({augknt(0:4,4),augknt(0:4,3)}, rand(7,8)) )
>
> Although close to what I want, it generates cubic splines not linear.
>
> Thanks

gridfit can fit a tensor product linear surface to
data points in two independent variables.

http://www.mathworks.com/matlabcentral/fileexchange/8998

HTH,
John