You can use DGELS to solve
[ 1 x_1 y_1 ] [ a ] [ z_1 ]
[ 1 x_2 y_1 ] [ b ] [ z_2 ]
min || [ 1 x_3 y_1 ] [ c ] - [ z_3 ] ||
(a,b,c) [ 1 x_4 y_1 ] [ z_4 ]
[ 1 x_5 y_1 ] [ z_5 ]
that'll give you (a,b,c). The equation of the plane that fits
the m (=5 in this case) points (x_i,y_i) best is z=ax+by+c.
On Mon, 9 Nov 2009, Sarkissian, Edwin (388D) wrote:
Which lapack routine(s), if any, ?can be used to fit a plane to a set of
points in 3D space?
Thank you in advance,