{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 "Hyperlink" -1 17 "" 0 1 0 128 128 1 2 0 1 0 0 0 0 0 0 1 }{CSTYLE "" -1 256 "" 0 16 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 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 1 18 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 1 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 1 16 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 262 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 271 "" 1 16 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 272 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 273 "" 1 18 0 0 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 0 0 0 }{CSTYLE "" -1 335 "" 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 336 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 337 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 338 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 339 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 340 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 341 "" 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 "Title" -1 18 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 1 2 2 2 1 1 1 1 }3 1 0 0 12 12 1 0 1 0 2 2 19 1 }{PSTYLE "Author" -1 19 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 8 8 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 256 1 {CSTYLE "" -1 -1 "Time s" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }3 1 0 0 8 4 1 0 1 0 2 2 0 1 } {PSTYLE "Normal" -1 257 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 258 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 1 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Normal" -1 259 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 0 0 1 0 1 0 2 2 0 1 } {PSTYLE "Normal" -1 260 1 {CSTYLE "" -1 -1 "Times" 1 16 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 "Normal" -1 261 1 {CSTYLE "" -1 -1 "Times" 1 16 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }} {SECT 0 {EXCHG {PARA 18 "" 0 "" {TEXT 288 34 "Introduction to Maplets \+ in Maple 8" }}{PARA 19 "" 0 "" {TEXT -1 34 "Copyright 2002 Waterloo Ma ple Inc." }{TEXT 309 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 " " 0 "" {TEXT 323 7 "Maplets" }{TEXT -1 105 " is a revolutionary packag e that provides the ability to create custom graphical user interfaces , called " }{TEXT 338 7 "maplets" }{TEXT -1 365 ", to access Maple's c omputational engine. This Java\231-based technology can include button s, toolbars, menu bars, radio buttons, pop-up menus, drop down buttons , plotter windows and a host of other elements. However, you do not ne ed knowledge of Java to design maplets. You only need knowledge of bas ic Maple programming and some understanding of the Maplets package." } }{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 4 "The " } {TEXT 339 7 "Maplets" }{TEXT -1 64 " package was available for Maple 7 as an add-on package through " }{TEXT 340 19 "www.MaplePrimes.com" } {TEXT -1 30 ". An enhanced version of the " }{TEXT 341 7 "Maplets" } {TEXT -1 88 " package is built-in to Maple 8 and does not require any \+ separate package installations." }}{PARA 0 "" 0 "" {TEXT -1 1 " " }}} {SECT 1 {PARA 3 "" 0 "" {TEXT -1 12 "Introduction" }}{PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 329 7 "Maplets" }{TEXT -1 42 " package contai ns one top-level function, " }{TEXT 310 7 "Display" }{TEXT -1 25 ", an d three subpackages: " }{TEXT 311 8 "Elements" }{TEXT -1 2 ", " } {TEXT 312 8 "Examples" }{TEXT -1 5 " and " }{TEXT 313 5 "Tools" } {TEXT -1 6 ". The " }{TEXT 314 7 "Display" }{TEXT -1 62 " function is \+ required to display or run a defined maplet. The " }{TEXT 315 8 "Eleme nts" }{TEXT -1 136 " subpackage contains elements required to define t he components of a maplet. Simple elements include buttons, menus and \+ text areas. The " }{TEXT 316 8 "Examples" }{TEXT -1 98 " subpackage co ntains predefined maplets that you can use alone and in other maplets. Finally, the " }{TEXT 317 5 "Tools" }{TEXT -1 196 " subpackage contai ns routines for manipulating and interacting with maplets and maplet d escriptions.\n\nA maplet is created by listing a series of elements in which the highest-level element is the " }{TEXT 318 8 "Maplet()" } {TEXT -1 445 " element. From there, you define the layout structure or graphical interface elements of the maplet. This includes the layout \+ elements and actions that you define to be performed on specified elem ents. Several options are available to structure the layout of a maple t. To create a maplet without any formatting, you can simply specify t he elements as a nested Maple list between square brackets \"[]\". How ever, there are numerous commands in the " }{TEXT 337 7 "Maplets" } {TEXT -1 79 " package for creating maplets with more advanced formatti ng and functionality. " }}{PARA 0 "" 0 "" {TEXT -1 193 "\nWhen a maple t is running, interacting with the Maple worksheet is not possible. Ho wever, when the [x] in the window is clicked, the maplet closes and co ntrol is returned to the Maple session. " }}}{SECT 1 {PARA 3 "" 0 "" {TEXT 256 14 "A Basic Maplet" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 34 "As with any package in Maple, the " }{TEXT 257 7 "Maplets" } {TEXT -1 83 " package must be invoked before attempting to use the rou tines defined. Since the " }{TEXT 258 8 "Elements" }{TEXT -1 113 " su bpackage contains all of the routines required to define a maplet, sol ely invoking this package is sufficient." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "with(Maplets[Elements]):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 189 "The first example, called basicMaplet, uses nested lists to display the string \"Hello World\" in a maplet. Again, when defin ing a maplet, the top-level element must be the Maplet element. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 258 "" 0 "" {TEXT -1 168 "Note: \+ An XML data structure is created automatically when defining a Maplet . To supress this output, end the definition with a colon (:) as oppo sed to a semi-colon(;)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "b asicMaplet := Maplet( [[\"Hello world!\"]] ):" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "With the maplet defined, use the display function to r un the maplet." }}{PARA 258 "" 0 "" {TEXT -1 164 "Note: The maplet mu st finish running before you can resume interacting with the Maple wor ksheet in which the maplet was written. To close this maplet, click t he [" }{TEXT 324 1 "x" }{TEXT -1 28 "] in the upper right corner." }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "Maplets[Display](basicMaplet );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 3 "" 0 "" {TEXT 259 14 "Simple Maplets" }{TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 611 "Maplets can do much more then display basic text strin gs. Maplets can make calls to virtually any function in the Maple libr ary, including equation solvers, graphics and both built-in and user-w ritten library code. Given this capability, a maplet user can essentia lly perform calculations and display graphs without ever needing knowl edge of Maple syntax. All calculations and graphs are displayed in the maplet window. While a maplet is running, a user can continually int eract with the maplet by entering the required information, clicking a button or selecting a menu to perform an action or calculation. " } }{SECT 1 {PARA 4 "" 0 "" {TEXT 260 35 "Performing Calculations in a Ma plet" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 284 "The following exa mple defines an Integration Maplet which contains two text regions for the user to enter a function and a variable of integration. This map let has two buttons: one to perform the calculation and display the re sult on the maplet, and the second to close the maplet. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 2310 " # The first step when designing a maplet is to assign a\n # name, IntMaplet, and define the top-leve l element to be \n # the Maplet element.\n\nIntMaplet := Maplet([ \n \n # By default, text strings are horizontally centered in \n # mapl et window, where each set of square brackets \n # represents a row in a maplet.\n # To form a text string, enclose text in quotation marks .\n\n[\"Integration Maple\"], \n[\"Enter an expression to be integrate d\"],\n\n # The following row definition includes the text string \n \+ # \"Integrand\" and a text field for the user to enter the \n # func tion. The TextField[TF1] element creates an input \n # field that is by default 20 characters long. The input \n # field reference is d efined as TF1 enclosed in single \n # quotation marks.\n\n[\"Integran d: \", TextField['TF1']()],\n\n # The following row is another text f ield asking for the \n # variable of integration. The TextField is d efined to\n # be 3 characters in length. The input reference is \n \+ # defined as TF2.\n\n[\"Enter a variable of Integration:\", TextField[ 'TF2'](3)],\n\n # This TextBox field cannot be edited and will displa y the \n # result of the action or integration. The output field\n \+ # reference is defined as TB1 that is 3 rows high and 40\n # characte rs in length.\n \nTextBox['TB1']( not editable, width='40', height='3 '),\n\n # The final list displays two buttons on the maplet \n # whe re each button performs a separate action. The \n # first button, In tegrate, calls the int function to \n # calculate the integral taking the input that was entered \n # by the user (TF1 and TF2) and displa ys the anti-derivative \n # in the output region TB1. The second but ton contains the \n # Shutdown action which closes the maplet and dis plays the \n # entries of the two input regions (TF1 and TF2) as well as \n # the result of the calculation in the output region (TB1) \n \+ # in the Maple worksheet. If nothing was entered, an empty \n # lis t is returned.\n \n[Button(\"Integrate\", Evaluate('TB1' = 'int(TF1, TF2)')),\n Button(\"OK\", Shutdown(['TF1', 'TF2', 'TB1']))]\n \n # \+ The right square bracket completes the main list. The \n # right par enthesis completes the maplet definition. \n \n ]):\n\n # The Di splay command in square brackets runs the maplet \n # assigned to Int Maplet.\n\n Maplets[Display]( IntMaplet );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 105 "To perform the same calculation in a Maple worksheet, a \+ user would have to know the proper Maple syntax. " }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 15 "int(sin(x), x);" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 261 13 "MathML V iewer" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 198 "By default, the \+ result of all calculations are displayed as ASCII text strings in a ma plet. Results may, however, be displayed in standard mathematical not ation and exported as MathML by using the " }{TEXT 262 12 "MathMLViewe r" }{TEXT -1 11 " element. \n" }}{PARA 0 "" 0 "" {TEXT -1 126 "Using t he same maplet definition as before, we will enhance this routine to d isplay the output from the calculation as MathML." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 659 "IntMaplet2 := Maplet([ \n\n [\"Integration \+ Maple\"], \n [\"Enter an expression to be integrated\"],\n [\"Integr and: \", TextField['TF1']()],\n [\"Enter a variable of Integration:\" , TextField['TF2'](3)],\n\n # The MathMLViewer element replaces the \+ TextBox \n # element in the previous Maplet.\n \n MathMLViewer['TB1' ](),\n\n # The button definition for Integrate also changes \n # s ince the result of the calculation will be \n # exported into MathML and displayed in the \n # MathMLViewer window.\n \n [Button(\"I ntegrate\", Evaluate('TB1' = 'MathML[Export](int(TF1, TF2))')),\n But ton(\"OK\", Shutdown(['TF1', 'TF2']))]\n \n ]):\n\n Maplets[Disp lay]( IntMaplet2 );" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 333 12 "MathMLViewer" }{TEXT -1 115 " element displays mathematical expressions in standard \+ mathematical notation as expected by educators and students." }}}} {SECT 1 {PARA 4 "" 0 "" {TEXT 322 29 "Displaying Graphs in a Maplet" } }{PARA 0 "" 0 "" {TEXT -1 162 "Maplets can display 2-D and 3-D graphs. Previous examples used nested lists to define a maplet. The followi ng examples use more advanced layout options such as " }{TEXT 263 9 "B oxLayout" }{TEXT -1 2 ", " }{TEXT 264 9 "BoxColumn" }{TEXT -1 5 " and \+ " }{TEXT 265 6 "BoxRow" }{TEXT -1 10 " inside a " }{TEXT 266 6 "Window " }{TEXT -1 11 " element. " }{TEXT 331 6 "BoxRow" }{TEXT -1 28 " defi nes a row of items and " }{TEXT 330 9 "BoxColumn" }{TEXT -1 27 " creat es a column of items." }{TEXT 267 9 "BoxLayout" }{TEXT -1 28 " is requ ired when including " }{TEXT 268 6 "BoxRow" }{TEXT -1 5 " and " } {TEXT 269 9 "BoxColumn" }{TEXT -1 28 " elements in a maplet. The " } {TEXT 332 6 "Window" }{TEXT -1 42 " element defines a window in a mapl et. A " }{TEXT 270 6 "Window" }{TEXT -1 229 " should not be thought o f as a maplet, but rather as one element within a maplet. Each window \+ can contain many elements that control the layout and function of the \+ window. A maplet can define and display several window elements. " }} {PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 176 "The foll owing example defines a maplet called PlottingMaplet. This maplet all ows users to enter a function and display the graph in the maplet once the Plot button is clicked." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 731 "PlottingMaplet := Maplet(\n \n # Include a title of this maplet and state the \n # layout refe rence ID\n \n Window('title' = \"Plotter Maplet\", 'layout' = 'BL1'), \n\n # BoyLayout is required to define the BoxRow and \n # BoxCo lumn statements\n\n BoxLayout['BL1'](\n BoxColumn(\n BoxRo w(\"Enter a function of 'x' to be plotted:\"), \n BoxRow(TextFi eld['TF1']()),\n BoxRow(\"Plot the function\"),\n\n # To dis play a graph on a Maplet, the Plotter element\n # is required\n\n \+ BoxRow(Plotter['PL1']()),\n BoxRow(Button(\"Plot\", Evalu ate('PL1'='plot(TF1, \n x = - 10..10)') ), \n Button(\"Close\", Shutdown(['TF1'])))\n) )):\nMaplets[Display](PlottingMaplet);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 271 16 "Adding a S lider " }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 119 "A slider allows the user of a maplet to select an integer between two points. For ex ample, by using a slider with the " }{TEXT 272 7 "Plotter" }{TEXT -1 105 " element, the user can change the range of a plot definition in a maplet with the slider value specified." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 256 "Enhancing the previous maplet def inition, the following example defines a maplet called PlottingSliderM aplet. After clicking the Plot button in this example, use the slider at the bottom of the maplet to change the axis range and graph in the plot region." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 688 "PlottingSl iderMaplet := Maplet(\n Window('title' = \"Plotter Maplet\", 'layout ' = 'BL1'),\n BoxLayout['BL1'](\n BoxColumn(\n BoxRow(\"E nter a function of 'x' to be plotted:\"), \n BoxRow(TextField[' TF1']()),\n BoxRow(\"Plot the function\"),\n BoxRow(Plot ter['PL1']()),\n\n # Define a slider where 0..20 is the value range \+ to \n # choose from.\n\n BoxRow(Slider['SL1']( 0..20, 10, 'ma jorticks'=5, 'minorticks'=1, filled=true, Evaluate('PL1' = \+ 'plot([TF1, TB1], x=0..SL1)' ) )), \n BoxRow(Button(\"Plot\", \+ Evaluate('PL1' = 'plot(TF1, x=0..SL1)') ), \n Button(\"C lose\", Shutdown(['TF1'])))\n))):\nMaplets[Display](PlottingSliderMapl et);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 77 "Move the slider to 2 to view the plot of the func tion for the range x = 0..2." }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 307 13 "Adding a Menu" }}{PARA 0 "" 0 "" {TEXT -1 119 "Using the maplet de fined in the previous section, we will enhance the procedure to includ e a menu bar and menu options." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 1089 "MenuMaplet := Maplet(\n\n# To display the menu, initialize this feature by stating the menubar n ame in the \n# Window definition, MB1.\n\n Window('title' = \"Plotte r Maplet\", 'layout' = 'BL1', 'menubar'='MB1'),\n BoxLayout['BL1']( \n BoxColumn(\n BoxRow(\"Enter a function of 'x' to be plot ted:\"), \n BoxRow(TextField['TF1']()),\n BoxRow(\"Plot \+ the function\"),\n BoxRow(Plotter['PL1']()),\n BoxRow(Sl ider['SL1']( 0..20, 10, 'majorticks'=5, 'minorticks'=1, filled=true, \+ Evaluate('PL1' = 'plot([ TF1, TB1], x=0..SL1)' ) )), \n BoxRow(Button(\"Plot\", Evaluat e('PL1' = 'plot(TF1, x=0..SL1)') ), \n Button(\"Close\", Shutdown(['TF1']))),\n\n# To add menus to a menu bar, state the menu \+ name and include the options using the \n# MenuItem routine. To add se veral menus, separate entries with a comma and define \n# additional m enus.\n\n MenuBar['MB1'](Menu(\"File\", MenuItem(\"Close\", Shutdown (['TF1']))), \n Menu(\"Edit\", MenuItem(\"Clear\", SetOp tion('TF1'=\"\"))))\n\n))):\nMaplets[Display](MenuMaplet);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 2 "A " }{TEXT 289 6 "Window" }{TEXT -1 49 " element can include of \+ the following elements: " }{TEXT 297 6 "Button" }{TEXT -1 2 ", " } {TEXT 296 8 "CheckBox" }{TEXT -1 2 ", " }{TEXT 290 8 "ComboBox" } {TEXT -1 2 ", " }{TEXT 291 11 "DropDownBox" }{TEXT -1 2 ", " }{TEXT 292 5 "Label" }{TEXT -1 2 ", " }{TEXT 293 7 "ListBox" }{TEXT -1 2 ", \+ " }{TEXT 294 12 "MathMLViewer" }{TEXT -1 2 ", " }{TEXT 295 4 "Menu" } {TEXT -1 2 ", " }{TEXT 298 7 "Plotter" }{TEXT -1 2 ", " }{TEXT 299 11 "RadioButton" }{TEXT -1 2 ", " }{TEXT 300 6 "Slider" }{TEXT -1 2 ", " }{TEXT 301 5 "Table" }{TEXT -1 2 ", " }{TEXT 302 7 "TextBox" }{TEXT -1 2 ", " }{TEXT 303 9 "TextField" }{TEXT -1 5 " and " }{TEXT 304 12 " ToggleButton" }{TEXT -1 69 ". Some of these elements have been includ ed in the examples above. " }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT 273 6 "Exampl" }{TEXT 306 0 "" }{TEXT 305 14 "es Subpackage " }{TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 278 8 "Examples" }{TEXT -1 120 " subpackage contains functions that display predefined maplets by simply entering the function name, ie. KernelOpts( );." }{TEXT 334 0 "" }{TEXT 335 0 "" }{TEXT -1 124 ". Maplet authors can use the \+ example maplets by themselves or in conjunction with other maplets. S ome simple examples are " }{TEXT 277 8 "GetColor" }{TEXT -1 2 ", " } {TEXT 276 7 "GetFile" }{TEXT -1 2 ", " }{TEXT 275 13 "GetExpression" } {TEXT -1 5 " and " }{TEXT 274 11 "GetEquation" }{TEXT -1 1 "." }} {PARA 0 "" 0 "" {TEXT -1 36 "\nAs with all packages in Maple, the " } {TEXT 336 17 "Maplets[Examples]" }{TEXT -1 67 " package must be invoke d in order to access the routines contained." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 24 "with(Maplets[Examples]);" }}}{SECT 1 {PARA 4 "" 0 "" {TEXT 279 7 "GetFile" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 4 " The " }{TEXT 280 7 "GetFile" }{TEXT -1 305 " maplet provides a file ch ooser that allows you to navigate throughout your local directory stru cture. The result that is returned to the Maple worksheet is a path o f the selected file. \n\nYou no longer need to leave Maple to determi ne the exact location and path of a file that is to be read into Maple ." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 30 "GetFile('title' = \"Get File\");" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 281 9 "GetColor " }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 4 "The " }{TEXT 282 8 "GetColor" } {TEXT -1 273 " maplet displays a color dialog that prompts you to sele ct a color. The value returned to the Maple worksheet is an RGB COLOR \+ data structure that you can then use in plot definitions. \n\nIf you \+ are not satified with the predefined colors available in Maple, simply use the " }{TEXT 283 8 "GetColor" }{TEXT -1 36 " Maplet to choose a d ifferent color." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 34 "GetColor( 'title' = \"Get Color\" );" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "Us e the RGB color data structure in a plot definition." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 67 "plot(-x^3+6*x^2+27, x=-10..10, color=COLOR(RGB,1 8/85,61/85,31/51));" }}}}}{SECT 1 {PARA 3 "" 0 "" {TEXT 284 16 "Advanc ed Example" }{TEXT 308 1 "s" }{TEXT -1 0 "" }}{PARA 4 "" 0 "" {TEXT 285 48 "More advanced maplets that are available in the " }{TEXT 325 8 "Examples" }{TEXT 326 19 " package include a " }{TEXT 327 13 "Linear Algebra" }{TEXT 328 82 " subpackage containing interfaces for some of \+ the following LinearAlgebra routine." }}{PARA 4 "" 0 "" {TEXT 319 179 "\267Constructors - BezoutMatrix and Hilbert\n\267Queries - ConditionN umber\n\267Solvers - QRDecomposition\n\267Eigenvalue Problems - Singul arValues\n\267Standard Routines - MatrixNorm and VectorNorm" }}{SECT 1 {PARA 4 "" 0 "" {TEXT 286 13 "Bezout Maplet" }{TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT 287 12 "BezoutMatrix" }{TEXT -1 133 " allows the user \+ to return a Bezout matrix to a Maple worksheet by providing two polyno mials and specifying conditions in the maplet." }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "with(Maplets[Examples][LinearAlgebra]);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "BezoutMatrix();" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{SECT 1 {PARA 4 "" 0 "" {TEXT 321 11 "Matrix Norm" }}{PARA 0 "" 0 "" {TEXT 320 10 "MatrixNorm" } {TEXT -1 45 " returns the matrix norm of a square matrix. " }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "MatrixNorm(<<1,3>|<2,5>>);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "QRDecomposition(<<1,3>|<2,5> |<5,7>>);" }}}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{SECT 1 {PARA 3 "" 0 " " {TEXT -1 9 "Resources" }}{PARA 0 "" 0 "" {TEXT -1 83 "Extensive Help Pages have been designed to accompany the Maplest package including \+ " }{HYPERLNK 17 "Maplets Tutorial" 2 "examples,MapletsTutorial" "" } {TEXT -1 2 ", " }{HYPERLNK 17 "Maplets Layout Guidelines" 2 "examples, MapletsLayout" "" }{TEXT -1 2 ", " }{HYPERLNK 17 "Roadmap to Learning \+ Maplets" 2 "Maplets,RoadMap" "" }{TEXT -1 5 " and " }{HYPERLNK 17 "mor e" 2 "Maplets,Index" "" }}}}{MARK "0 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }