{VERSION 3 0 "IBM INTEL NT" "3.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Title" 0 18 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 1 0 0 0 0 0 0 }3 0 0 -1 12 12 0 0 0 0 0 0 19 0 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT -1 8 "Polyfits" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 14 " with(stats); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(plots): " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "with(statplots): " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 67 "Let's enter the data: X vs Y data and plot it using 'scatterplo t' \n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 51 "data:=[0.01,0.5,1, 1.5,2], [10.56,3.7,1.4,0.8,0.5]; " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "dataplot:=scatterplot(data,symbol=diamond,color=red); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 9 "dataplot;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "run:=fit[leastsquare[ [x,y], y=a +b *x + c*x^2 + d*x^3+e*x^4, \{a,b,c,d,e\}] ] ([data] ); " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "polydegree4:=rhs(run); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "curve:=plot((polydegree4),x=0..2,color=green):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 60 "Let's plot the data points and curve fit on the same graph: " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 28 "display(\{ dataplot,curve\} ); " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }} }}{MARK "15" 0 }{VIEWOPTS 1 1 0 1 1 1803 }