Using your data file, I get: $ cat v.m clear all inputData = load( "test.dat" ); x = inputData( : , 1 ); y = inputData( : , 2 ); P = polyfit(x,y,10); ynew = polyval(P,x);
$ cat test.dat -1196.4 315571.7086 -1195.2 315575.9618 -1194 315579.4195 -1192.8 315582.6206 -1191.6 315585.4966 -1190.4 315588.3172 -1189.2 315590.9326 -1188 315593.5934 -1186.8 315596.0455 -1185.6 315598.4201 -1184.4 315600.7143 -1183.2 315602.9508 -1182 315605.1765 So v.m has your commands and test.dat is your data file. Now, running v.m, I get octave:2> norm(y-ynew) ans = 6.3300 While Matlab's result is slightly better (norm of difference is ~0.4), I don't see the results to differ that much? Oh, and Matlab warns about the polynomial being badly conditioned. Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]