// example 4.34 // obtain least square straight line fit x=[.2 .4 .6 .8 1]; f=[.447 .632 .775 .894 1]; [P]=straightlineapprox(x,f) // call of the function to get the desired solution