print(res + this means that the best straight line fit is the following functionf( we then use poly (to create model function from the model parameters sp poly (fp print(error( xy) we have used full=true to retrieve more details on the fitting process normallywe would not need itin which case only the model parameters would be returned in factwhat we do here is simple curve fitting you can find out more about it on wikipedia by going to org/wiki/curve_fitting we can now use (to plot our first trained model in addition to the earlier plotting instructionswe simply add the followingfx sp linspace( , [- ] generate -values for plotting plt plot(fxf (fx)linewidth= plt legend([" =%if order]loc="upper left"the following graph shows our first trained model