{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 261 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{PSTYLE "Normal " -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 2" -1 4 1 {CSTYLE "" -1 -1 "Times" 1 14 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 2 1 0 1 0 2 2 0 1 }{PSTYLE "Warning" -1 7 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 2 2 2 2 2 1 1 1 3 1 } 1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Error" -1 8 1 {CSTYLE "" -1 -1 " Courier" 1 10 255 0 255 1 2 2 2 2 2 1 1 1 3 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 11 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Output" -1 12 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 3 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Maple Plot" -1 13 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 256 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }3 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 0 "" }}{PARA 256 "" 0 "" {TEXT 256 13 "Using Maplets" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 31 "Fi rst load the Maplets package." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 56 "wi th(Maplets[Elements]):\nwith(StringTools):\nwith(plots):" }}{PARA 7 " " 1 "" {TEXT -1 58 "Warning, the assigned name Group now has a global \+ binding\n" }}{PARA 7 "" 1 "" {TEXT -1 50 "Warning, the name changecoor ds has been redefined\n" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 13 "Basic Maplets" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 14 "Dialogue Boxes" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "First define a Maplet using the In putDialog framework." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 189 "with(Maple ts[Elements]):\ngetInt:=Maplet(\n InputDialog['ID1'](\"Enter an inte ger\",\n 'onapprove'=Shutdown(['ID1']),\n 'oncancel'=Shutdow n()\n )\n):\nresult:=Maplets[Display](getInt);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'resultG7#Q!6\"" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "To access the string, reference the first element of the list. i.e ., " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 19 "valStr:=result[1];\n" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%'valStrGQ#106\"" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 64 "To get the actual value of the string use the pars e( ) function " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 31 "parse(valStr);\nt ype(%,integer);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#5" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#%%trueG" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "?InputDialog" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 7 "Plotter" } }{EXCHG {PARA 0 "" 0 "" {TEXT -1 41 "USe a Plotter to create simple 2- D plots." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 229 "mjs2d := Maplet([\n \+ [\"Enter a function of 'x':\", \n TextField['TF']() ],\n [Plotter ['PL']( plot(undefined, x = 0..10) ) ],\n [Button(\"Plot\", Evaluate ('PL' = 'plot('TF', x = 0..10)') ), Button(\"OK\", Shutdown(['TF'] ))]\n]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "Maplets[Display ](mjs2d);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#Q)x*sin(x)6\"" }}}} {SECT 0 {PARA 4 "" 0 "" {TEXT -1 10 "Drop Boxes" }}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 300 "beerList:=[\"Labatts\",\"Moosehead\",\"Brador \",\"Molson\"]:\npickBeerBox := Maplet([\n [\"Pick your favorite Can adian beer: \",\n DropDownBox['DDB1']( \n sort(beerList, le xorder) \n )],\n [Button(\"OK\", Shutdown(['DDB1'])), \n B utton(\"Cancel\", Shutdown()) ]\n]):\nMaplets[Display](pickBeerBox);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#Q'Brador6\"" }}}}{SECT 0 {PARA 4 " " 0 "" {TEXT -1 7 "Sliders" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 281 "with(Maplets[Elements]):\nmjsSlider:= Maplet([\n [\"Select a va lue: \", \n Slider['SL'](0..100, 10, \n 'showticks', 'majorticks '=20, \n 'minorticks'=10, 'snapticks'=false)],\n [Button(\"OK\", \+ Shutdown(['SL'])), \n Button(\"Cancel\", Shutdown())]\n]):\nMaplets [Display](mjsSlider);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#Q#106\"" }} }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 21 "Custom File Dialogues" }} {EXCHG {PARA 0 "" 0 "" {TEXT -1 69 "First define a procedure which cal ls a Maplet that uses the built-in " }{TEXT 257 10 "FileDialog" } {TEXT -1 81 " method. The string parameter passed to the Maplet sets t he title for the window." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 329 "aosGet File:= (filterStr::string)->\nMaplets[Display](\n Maplet(FileDialo g['FD'](\n 'title' = cat(\"Get a \", filterStr,\" File\"),\n \+ 'filefilter' = filterStr, \n 'filterdescription' = c at(filterStr,\" Files\"),\n 'onapprove' = Shutdown(['FD']),\n 'oncancel' = Shutdown()\n )\n )\n): " }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 122 "Now call the procedure with a par ticular string and then read the entire contents of the file using the readbytes command." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "filePath:=ao sGetFile(\"html\")[1]:\nfileContent:=readbytes(filePath,TEXT,infinity) :\nfclose(filePath):" }}{PARA 8 "" 1 "" {TEXT -1 34 "Error, invalid su bscript selector\n" }}{PARA 8 "" 1 "" {TEXT -1 55 "Error, (in readbyte s) file or directory does not exist\n" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 56 "Echo the file path and content to the screen as follows: " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 22 "filePath;\nfileContent;" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#Q7C:\\aos\\html\\basic.html6\"" }} {PARA 12 "" 1 "" {XPPMATH 20 "6#Qb_l~~~~~~|+~~~~~~|+~~~~~~ ~~~~~~~basic.html~|+~~~~~~|+~~~~~~|+~~~~~~ ~~~~~~|+~~~~~~~~~~~~~~~~~~Hello~world,~please|+~~~ ~~~~~~~~~~~~~~~|+~~~~~~~~~~~ ~~~~~~~~~~~~~send~me~mail|+~~~~~~~~~~~~~~~~~~!|+~~~~~~~~~~~~

|+ ~~~~~~|+~~~~~~|+6\"" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 16 "Function Plotter" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 27 "A Simp le Plotting Procedure" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 179 "Define a procedure which accepts an algebraic function of the variable 'x' and a string. The function is plotted along with a title and options, whi ch includes the input function." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 162 "simplePlot:=proc(fx::algebraic,tStr::string)\n plot(fx,x=0..10,axes= boxed,\n labels=[\"x\",\"f(x)\"],\n title=cat(tStr,\"\\n\",con vert(simplify(fx),string))):\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 79 "A typical call to the function will produce output similar to t hat shown below:" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "simplePlot(x*co s(x),\"My Title\");" }}{PARA 13 "" 1 "" {GLPLOT2D 503 265 265 {PLOTDATA 2 "6'-%'CURVESG6$7io7$$\"\"!F)F(7$$\"3emmm;arz@!#=$\"3(G%[SK #R\"G@F-7$$\"3[LL$e9ui2%F-$\"373*HnW!GUPF-7$$\"3nmmm\"z_\"4iF-$\"3!)>g H*[\">]]F-7$$\"39ommT&phN)F-$\"3c;\"p7y^Yg&F-7$$\"3KLLe*=)H\\5!#<$\"3h =qh)[!RF_F-7$$\"3smm\"z/3uC\"FB$\"3'\\)[\"p0ES'RF-7$$\"3!****\\7LRDX\" FB$\"36gr&4^GPr\"F-7$$\"3%om;zR'ok;FB$!3id$*y$*)z1c\"F-7$$\"33++D1J:w= FB$!3]rsnoTMScF-7$$\"3oLLL3En$4#FB$!3U%RaQ-Eb/\"FB7$$\"3#pmmT!RE&G#FB$ !3cV^Ej)Rt\\\"FB7$$\"3D+++D.&4]#FB$!3r>*)zy=/0?FB7$$\"3;+++vB_0jeGFB7$$\"3&om;z*ev:JFB$!3%R(G 78gr9JFB7$$\"3>+]7.%Q%GKFB$!3\")>Vj98F;KFB7$$\"3_LLL347TLFB$!37mPl/P$[ F$FB7$$\"3#QLL3xxlV$FB$!3Y['HJ%)R\")G$FB7$$\"3nLLLLY.KNFB$!3?$)yb0q@mK FB7$$\"3mm;HdO2VOFB$!3OoC$Gr2X>$FB7$$\"33++D\"o7Tv$FB$!3qR=2f;irIFB7$$ \"3km;HK5S_QFB$!32f`_zJ[>HFB7$$\"3?LLL$Q*o]RFB$!3fIO>vwdEFFB7$$\"3m++D \"=lj;%FB$!3_*opC^lN;#FB7$$\"3S++vV&RY2aFB$\"3G)=OvziJY$FB7$$\"3Znm;zXu9cFB$\"3N/#>hx*Q1WFB7$$\"34+++]y))G eFB$\"3Eyc@=6mP_FB7$$\"3H++]i_QQgFB$\"3khD(Gnb$eeFB7$$\"3U+](=-N(RhFB$ \"3#f,<3frm2'FB7$$\"3b++D\"y%3TiFB$\"3.l4VzXbNiFB7$$\"3S+DJ&f]tH'FB$\" 37GP@2)=nH'FB7$$\"3G+]P4kh`jFB$\"3hI#GzBkyL'FB7$$\"39+vVBA))4kFB$\"3g2 o-U\\]ejFB7$$\"3+++]P![hY'FB$\"3#f:vqH@#ejFB7$$\"3rK$eRP0n^'FB$\"3R$o& G)4G)RjFB7$$\"3KmmT5FEnlFB$\"39S:X=50/jFB7$$\"3#***\\(o/?yh'FB$\"3Y%pH BxJ2D'FB7$$\"3iKLL$Qx$omFB$\"3?bvdj0wzhFB7$$\"3cmm;z)Qjx'FB$\"3IC\"=#> '**)ofFB7$$\"3Y+++v.I%)oFB$\"3CMER&H?vn&FB7$$\"3?mm\"zpe*zqFB$\"3i)*Rl !\\;!\\\\FB7$$\"3;,++D\\'QH(FB$\"3#3JH_e@^(QFB7$$\"3%HL$e9S8&\\(FB$\"3 GNGyksDKEFB7$$\"3%om;/6E.g(FB$\"3b_Qh2wD2>FB7$$\"3s++D1#=bq(FB$\"3'oRs VHKwCXF-7$$\"3yl;zpe()=!)FB$!3e[Y/bCG;8FB7$$\"3a***\\7`Wl7)FB$!33gf\\% pqw=#FB7$$\"3cL$e*[ACI#)FB$!3GvqR\"> 8[QFB7$$\"3wnmTge)*R%)FB$!3GQxW&))=wm%FB7$$\"3%zmmTvJga)FB$!3y-yOj!oLX &FB7$$\"3A,]PM&*>^')FB$!39d?A**z>*='FB7$$\"3]MLe9tOc()FB$!3%Q47S)R1soF B7$$\"31,++]Qk\\*)FB$!3eH*)zZTIezFB7$$\"3![LL3dg6<*FB$!37**yn'[&yx))FB 7$$\"3K,+voTAq#*FB$!3C&QD]/E(f\"*FB7$$\"3%ymmmw(Gp$*FB$!3iA#))=pm[N*FB 7$$\"3%4]7`**)4A%*FB$!3[]#4[=l?U*FB7$$\"3/M$eRA5\\Z*FB$!3u#yQwL1IY*FB7 $$\"3f]7GQeJ,&*FB$!3;V1HX)*\\t%*FB7$$\"39nTg_9sF&*FB$!3'*R-@h;Gx%*FB7$ $\"3q$3Fp1FTb*FB$!3s\"*p=zCJu%*FB7$$\"3C++D\"oK0e*FB$!3Ia]\")*zdXY*FB7 $$\"3d**\\il(z5j*FB$!3(45wk;aoU*FB7$$\"3m+++]oi\"o*FB$!3#zH))ynBSO*FB7 $$\"3y,]PMR " 0 "" {MPLTEXT 1 0 804 "fdfPlotter := Maplet(\n 'onstartup'='showMain',\n Window['mainWindo w'](# begin window content [\n [[# define a text field to get the f unction \n \"Enter a function of 'x':\", TextField['f'](\"x*cos(x )\") ],\n [# define two plotter spaces \n Plotter['fSpace']( \+ height=400,width=300 ),\n Plotter['dfSpace']( height=400,width=30 0 ) ],\n [# define two buttons with actions\n Button( \"Plot \",'onclick'='makePlots'),\n Button( \"Close\",'onclick'='shutDow n') ]]\n ),# end of mainWindow content- Actions below\n Action['show Main'](\n RunWindow('mainWindow')\n ),\n Action['makePlots'](\n Evaluate( 'fSpace'='simplePlot( 'f',\"Given Function\")' ),\n E valuate( 'dfSpace'='simplePlot( diff('f',x),\"Derivative\")' )\n ), \n Action['shutDown'](\n Shutdown()\n )\n):# end Maplet content " }}}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 103 "When displaying a Maplet th e Maplets[Display]( ) method must always be called; note the capitaliz ation." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "Maplets[Display](fdfPlott er);" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT -1 8 "Quiz 4-1" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 375 "Make an interactrive Maplet to display a phase-space plot of an input function over a user specified time peri od. Here the input function should be a function of time only and may \+ be obtained via a textfield as illustrated above. The time period over which the phase-space plot is displayed may be set by the user using \+ a simple text field or by using an InputDialog( ) box.." }}}}{EXCHG {PAGEBK }{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 13 "Maplet Layout" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 13 "Mul tiple Rows" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 132 "The following examp le illustrates more clearly how one can make a MAplet with several row s, each of which contains a single element." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 291 "plot3D[1]:=Maplet([\n [\"Enter a function of 'x' a nd 'y':\",\n TextField['TF3D'](\"x*cos(y)\")],\n [Plotter['PL3D'] ('height'='200')],\n [Button(\"Plot\", \n Evaluate('PL3D'='plot3d (TF3D,x=0..10,y=0..10,axes=boxed)') )],\n [Button(\"OK\", Shutdown([ 'TF3D']))]\n]):\nMaplets[Display](plot3D[1]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#Q)x*cos(y)6\"" }}}{PARA 0 "" 0 "" {TEXT -1 193 "Where as the previous result did not use a Window or Action this Maplet does . While the result is the same, the implementation is much \"cleaner\" and allows for easier coding and troubleshooting!" }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 438 "plot3D[2]:=Maplet('onstartup'='showMain',\n Window['mainWindow']([\n [\"Enter a function of 'x' and 'y':\",\n \+ TextField['TF3D'](\"x*cos(y)\")],\n [Plotter['PL3D']('height'='200' )],\n [Button(\"Plot\",'onclick'='makePlot')],\n [Button(\"OK\", S hutdown(['TF3D']))]\n]),\nAction['showMain'](\n RunWindow('mainWind ow')\n ),\nAction['makePlot'](\n Evaluate('PL3D'='plot3d(TF3D,x= 0..10,y=0..10,axes=boxed)')\n )\n):\nMaplets[Display](plot3D[2]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#Q+x^2*cos(y)6\"" }}}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 15 "Advanced Layout" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 293 "This Maplet will plot a Gaussian Wavepacket over a ran ge determined by the mean value chosen with a slider.First define a pr ocedure that will plot a gaussian wave over a specified region. Make t he resulting graph a global variable so that it can be sent to a parti cular target within a Maplet." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 235 "w avePacket:=proc(mu)\nglobal wavePic:\nplot(1/sqrt(2*Pi)*exp(-(mu-x)^2/ 2),\n x=-3*(mu+1)..3*(mu+1),\n axes=boxed,\n title=cat(\"G aussian Wave (mean=\",convert(mu,string),\")\"),\n labels=[\"x\", \"Psi(x)\"]):\nwavePic:=display(%):\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "A call to the procedure produces the following output:" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 14 "wavePacket(0);" }}{PARA 13 "" 1 " " {GLPLOT2D 603 221 221 {PLOTDATA 2 "6'-%'CURVESG6$7en7$$!\"$\"\"!$\"3 `2!Q>T[=V%!#?7$$!3!******\\2<#pG!#<$\"3))H\"Q4Jv_]'F-7$$!3#)***\\7bBav #F1$\"3'Gckf!)3)e*)F-7$$!36++]K3XFEF1$\"3'zJq&=YDk7!#>7$$!3%)****\\F)H ')\\#F1$\"3C(G=C*G%)e7$$!3#****\\i3@/P#F1$\"3BH\"y6sdJS#F>7$$!3;++D r^b^AF1$\"3+;4SLY(G;$F>7$$!3$****\\7Sw%G@F1$\"3q\\(z&*Hm89%F>7$$!3**** *\\7;)=,?F1$\"3ciE_'3yiQ&F>7$$!3/++DO\"3V(=F1$\"3_d8c')\\b()oF>7$$!3#* *****\\V'zV7$$!3******\\d;%)G;F1$\"3UU:lFZue5!#=7$ $!3!******\\!)H%*\\\"F1$\"3cCu2uRG'H\"Fao7$$!3/+++vl[p8F1$\"3#\\vD%)) \\*=c\"Fao7$$!3\"******\\>iUC\"F1$\"3H$zPHs2'R=Fao7$$!3-++DhkaI6F1$\"3 :W3u=Yb0@Fao7$$!3s******\\XF`**Fao$\"3$)*4/QN85V#Fao7$$!3u*******>#z2) )Fao$\"3=**Qz\"=#y1FFao7$$!3S++]7RKvuFao$\"3e(yioYVp,$Fao7$$!3s,+++P'e H'Fao$\"3E66,n?=sKFao7$$!3q)***\\7*3=+&Fao$\"3p%)>w'zM._$Fao7$$!3[)*** \\PFcpPFao$\"3\"R@$)**)o\"er$Fao7$$!3;)****\\7VQ[#Fao$\"3'[U\"pr#Q#oQF ao7$$!35)**\\P9(\\$*=Fao$\"3Su4@1Ia=RFao7$$!32)***\\i6:.8Fao$\"35PnGj> pbRFao7$$!3%p)*\\i:sw%)*F>$\"3A4c)ReD,(RFao7$$!39$***\\(oKQm'F>$\"3Eq7 6#yu0)RFao7$$!3O***\\(=K**zMF>$\"3wE\"\\$py+()RFao7$$!3Wb+++v`hHF-$\"3 i*oG!4`S*)RFao7$$\"3l%**\\ilg4,$F>$\"3/JReJ[h()RFao7$$\"3%[***\\i]2=jF >$\"3;;)*[T#o9)RFao7$$\"3/&**\\(o%*=D'*F>$\"3Im#)p!o&)4(RFao7$$\"3]*** *\\(QIKH\"Fao$\"3iL,)>X,i&RFao7$$\"3K******\\4+p=Fao$\"3_U@#=A\\.#RFao 7$$\"38****\\7:xWCFao$\"3g$\\'oxX'>(QFao7$$\"3E,++vuY)o$Fao$\"3B1&R1tq qs$Fao7$$\"3!z******4FL(\\Fao$\"3*)yIT\"Q4FFao7$$\"3e******Hk-,5F1$\"3(evbfeBsT#Fao7$$ \"36+++D-eI6F1$\"34V;#pCua5#Fao7$$\"3u***\\(=_(zC\"F1$\"3>)fD4w:6$=Fao 7$$\"3M+++b*=jP\"F1$\"3C$fc5h7ta\"Fao7$$\"3g***\\(3/3(\\\"F1$\"3sw)Rs# \\&3I\"Fao7$$\"33++vB4JB;F1$\"3'))e/@Q4$o5Fao7$$\"3u*****\\KCnu\"F1$\" 39#RcnB&Gx')F>7$$\"3s***\\(=n#f(=F1$\"3)R6W]s#omoF>7$$\"3P+++!)RO+?F1$ \"3MeQv(Rn^R&F>7$$\"30++]_!>w7#F1$\"3#yP$fK!H*[TF>7$$\"3O++v)Q?QD#F1$ \"3_a0rPhxYJF>7$$\"3G+++5jypBF1$\"3([ZC$efx1CF>7$$\"3<++]Ujp-DF1$\"3S \"oI#zy/T7$$\"3++++gEd@EF1$\"3s\"o%))>*4RG\"F>7$$\"39++v3'>$[FF1$\" 3bQ+W*))oc8*F-7$$\"37++D6EjpGF1$\"3)oq+\"oL_(\\'F-7$$\"\"$F*F+-%'COLOU RG6&%$RGBG$\"#5!\"\"$F*F*Fh]l-%+AXESLABELSG6$Q\"x6\"Q'Psi(x)F]^l-%&TIT LEG6#Q7Gaussian~Wave~(mean=0)F]^l-%*AXESSTYLEG6#%$BOXG-%%VIEWG6$;F(F_] l%(DEFAULTG" 1 2 0 1 10 0 2 9 1 2 2 1.000000 45.000000 45.000000 0 0 " Curve 1" }}}}{PARA 0 "" 0 "" {TEXT -1 106 "The layout here produces t wo columns. The first column contains only one row and the second cont ains two." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 403 "makeWave:=Mapl et('onstartup'='showMain',\nWindow['mainWindow']([\n [ [Plotter['wav eSpace']('height'='200')],\n [ [\"Mean: \",TextField['mu'](\"0\")] ,\n [Button(\"Plot\",'onclick'='makePlot'),\n Button(\"Cl ose\", Shutdown())] \n ] \n ]\n]),\nAction['showMain'](\n Run Window('mainWindow')\n ),\nAction['makePlot'](\n Evaluate('waveS pace'='wavePacket(mu)')\n )\n):\nMaplets[Display](makeWave);" } {TEXT -1 0 "" }}}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 16 "Setting Option s " }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 35 "Here is a Maplet that utiliz es the " }{TEXT 258 12 "SetOption( )" }{TEXT -1 58 " method to write d ata to a new field and return the value." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 384 "changeName:=Maplet([\n [\"Input your name:\", Text Field['nameIn'](20)],\n [\"Your name is:\", TextField['nameOut'](20, 'editable'='false')],\n [Button(\"Clear Name\", \n SetOpti on('target'='nameIn','value'=\"\")),\n Button(\"Write Name\",\n \+ SetOption('target'='nameOut',Argument('nameIn'))),\n Button( \"Quit\", Shutdown(['nameOut']))\n ]\n]):\nMaplets[Display](changeNa me);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#7#Q6Michael~JAy~Schillaci6\"" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 5 "Menus" }}{EXCHG {PARA 0 "" 0 " " {TEXT -1 92 "In the followiung Maplet a simple menu is established t o allow a user to interface with the " }{TEXT 259 13 "simplePlot( )" } {TEXT -1 27 " procedure developed above." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 624 "menuMaplet := Maplet(\nWindow('menubar'='mainMenu',[ \n [Plotter['plotSpace'](undefined)], \n [Button(\"Quit\", Shutd own(\"Closed from button\"))]\n]),\nMenuBar['mainMenu'](\n Menu(\"Fi le\", \n MenuItem(\"Close\", Shutdown(\"Closed from menu\"))\n \+ ),\n Menu(\"Options\",\n MenuItem['ch1'](\"Plot Sine\",'o nclick'='makeSine'),\n MenuItem['ch2'](\"Plot Cosine\",'onclic k'='makeCosine')\n )\n ),\nAction['makeSine'](\n Evaluate('pl otSpace'='simplePlot( sin(x),\"The Simple Sine\")')\n ),\nAction['ma keCosine'](\n Evaluate('plotSpace'='simplePlot( cos(x),\"The Simple \+ Cosine\")')\n )\n\n):\nMaplets[Display](menuMaplet);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#Q1Closed~from~menu6\"" }}}}{SECT 0 {PARA 3 "" 0 " " {TEXT -1 8 "Quiz 4-2" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 123 "Constru ct a Maplet that will (finally) allow a user to plot the trajectory fo r a projectile with initial staring velocity, " }{XPPEDIT 18 0 "V[0]; " "6#&%\"VG6#\"\"!" }{TEXT -1 20 " and initial angle, " }{XPPEDIT 18 0 "theta;" "6#%&thetaG" }{TEXT -1 341 " starting from a height of zero . Choose a layout of your choice and offer at least two possible versi ons. In at least one version implement a menu that will allow the user to choose between damping and no damping cases. In the case of dampin g you will have to ask the user what value they want for 'k'. To accom plish this, you might use the " }{TEXT 260 14 "InputDialog( )" }{TEXT -1 44 " method shown above in combination with the " }{TEXT 261 12 "Se tOption( )" }{TEXT -1 19 " method discussed. " }}}}}{MARK "3 3 3 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }