{VERSION 2 3 "SUN SPARC SOLARIS" "2.3" } {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 "Heading 1" 0 3 1 {CSTYLE "" -1 -1 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 }1 0 0 0 6 6 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 {PARA 18 "" 0 "" {TEXT -1 24 "Example of Least Squares" }} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 35 "Call up Help Page on Least Square s:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "?leastsquares" }}}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 24 "Set up x and y values..." }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "xvalues := [1,2,3,4,5];" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "yvalues := [2,3,3,5,6];" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 115 "points := [ [1,2], [2,3], [ 3,3], [4,5], [5,6] ]:\npplot := plot(points, x=0..10, style=point, sym bol=circle):\npplot;" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 19 "Apply L east Squares" }}{PARA 0 "" 0 "" {TEXT -1 25 "Read in stats package ... " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(stats):" }}}{PARA 0 "" 0 "" {TEXT -1 11 "Linear fit:" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "eq_fit:= fit[\n leastsquare[[x,y], y=m*x+b, \{m,b\} ]]\n ([xvalues, yvalues]);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "eq_fit;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plot s):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "lplot := plot (rhs(e q_fit),x=0..10):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "display ([pplot,lplot]);" }}}{PARA 0 "" 0 "" {TEXT -1 17 "Quadratic Fit ..." } }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "eq_fit:= fit[\n leastsqua re[[x,y], y=a*x^2+b*x+c, \{a,b,c\}]]\n ([xvalues, yvalues]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "eq_fit;" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "qplot := plot (rhs(eq_fit),x=0..10):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 23 "display([pplot,qplot]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "display([pplot,lplot,qplot]) ;" }}}}}{MARK "3" 0 }{VIEWOPTS 1 1 0 1 1 1803 }