Maple Flow User Manual
Maple Flow User Manual
iii
Contents
v
List of Tables
Table 1.1: How Maple Flow differs from Maple ........................................................................................ 3
Table 2.1: Container states ..................................................................................................................... 6
Table 3.1: Difference between numeric and symbolic evaluation modes ......................................................... 9
Table 3.2: Using the Command Completion feature and Expression Palette to insert a square root ..................... 10
Table 7.1: Keyboard shortcuts .............................................................................................................. 32
vi
1 Introduction
1.1 Maple Flow
Maple Flow is a new calculation tool from Maplesoft. Maple Flow offers a freeform user interface combined with a
comprehensive math engine. Use Maple Flow for engineering, scientific, and technical calculations and documentation.
Note for non-Windows users: The keystrokes given in this document are for Windows. If you are using a different
platform, see the keyboard shortcuts for your platform in Keyboard Shortcuts (page 32).
This manual should be read in unison with the in-product tutorials and exercises; these are available from the Tutorial
link on the Maple Flow Home page. If you've closed the Home page, you can access it again from the View menu:
• Select View > Home
1
2 • Introduction
This manual does not describe the math functionality of the Maple Flow in detail, but makes references to specific
functions in context of a broader discussion. The detailed documentation for the math functionality resides in the Maple
online help: http://www.maplesoft.com/support/help.
Maple Flow
• Is built on top of the Maple programming language
• Borrows a few elements from the Maple interface
Maple Flow's "language" is the commands (and their syntax), data structures and programming language. These are
based on the Maple programming language; you can use any of the math functions in Maple in your Maple Flow analyses.
Maple Flow differs from the Maple interface and programming language in a number of ways. Several important dif-
ferences are listed in Table 1.1.
Maple worksheets cannot be loaded into the Maple Flow, or vice versa.
Browse: Browse the table of contents to view a structured list of help topics
View Help Page as Worksheet: You can open any help page as a worksheet to interact with the page and modify the
examples.
• With the help page displayed in the right pane of the help system, from the View menu, select Open Page as
Worksheet. A new worksheet window opens.
4 • Introduction
• Alternately, click Open current page as worksheet ( ) in the help system toolbar.
Additional Documentation
Since Maple Flow uses the Maple programming language, you have the ability to use the vast math functionality that
is part of the Maple programming language. When browsing the help system, some hyperlinks take you to additional
detailed documentation for the math functionality that reside on the Maplesoft website, in the Maple online help:
http://www.maplesoft.com/support/help. Note that these pages are formatted as Maple pages, not Maple Flow pages,
so the examples will look a little different.
1.6 Interface
The different parts of the Maple Flow interface, as seen in Figure 1.2, are:
• Canvas — the workspace
• Main toolbar — This toolbar is always at the top of the Maple Flow window.
• Context toolbar — This toolbar, located directly above the canvas, is relevant to the current selection.
• Palettes — In the left pane, these provide an easy way to enter a math expression, matrix, Greek letter, or units.
• Context panel — Some options relevant to the current selection appear here, such as numeric formatting and units
formatting.
• Status Bar — Displays system information
Click Apply to Session to apply for the current Maple Flow session only, or click Apply Globally to apply the setting
to the current session an future sessions.
To display the grid, click the Enable/Disable Grid button on the main toolbar.
The grid cursor can be moved by pointing and clicking with the mouse, or with the arrow keys.
Math and text containers are created at the location of the grid cursor.
Math Text
Stationary with no focus. A math container
in this mode is still "live", and the Maple
Flow will update its result if an upstream
parameter changes.
Editing Numeric:
• Only one container can be in editing
mode at any one time.
• A math container has a solid dark green
border if numeric, or a dashed light green
border if symbolic (see Numeric and Symbolic:
Symbolic Evaluation Modes (page 9))
• A text container has a blue border.
• You will see a flashing cursor, whose
position can be changed with the arrow
keys or mouse.
Move
• Math and text containers have a light
blue border in move mode.
6
7 • Canvas
Math Text
• One or several containers can be in move
mode.
• Move the containers with the mouse or
Ctrl + arrow keys.
Group of Containers
To move multiple containers:
1. Click in a blank part of the canvas.
2. Drag a selection box around a group of containers.
3. Release the mouse button.
4. Move the mouse pointer over one of the selected containers.
5. Drag the containers to another location.
The numeric evaluation mode performs as much numeric evaluation as possible. For example:
• Rational fractions (such as ½) are converted to floating-point numbers
• Pi and exp(1) evaluate to floating-point numbers
Symbolic evaluation mode prevents numeric evaluation (except when requested by the user). For example:
• Rational fractions are only converted to floating-point numbers if request by the user (e.g. with the evalf command)
• Pi evaluates to a symbolic name
In both modes, unassigned names are evaluated symbolically (i.e. in numeric mode, unassigned names do not give an
error when evaluated).
The current mode of an existing math container is given by clicking inside it, and observing the state of the border or
Numeric/Symbolic buttons in the Context toolbar, as illustrated in Table 3.1.
By default, new math containers are numeric. Clicking the Symbolic button in the Context toolbar switches the in-focus
math container to symbolic mode. Alternatively, use the shortcut key Alt + S.
9
10 • Entering Math
Holding down the Symbolic button for a second makes symbolic evaluation mode "sticky". This is indicated with a
padlock by the Symbolic button ( ). This means that all future math containers will be symbolic (until symbolic
mode is toggled off with another long click on the Symbolic button).
For example, entering a:=4 in a math container assigns the value 4 to the name a.
Note that multiplication must always be explicitly stated. For example, you must enter 3*x, not 3x.
You can also use the Expression palette or Command Completion feature to enter typeset math, as illustrated in Table
3.2.
Table 3.2: Using the Command Completion feature and Expression Palette to insert a square root
11 • Entering Math
For more information on command completion, see Command Completion (page 28).
The unit complex number is created with 1i. You cannot just enter i for the unit complex number.
3.9 Units
Entering Units
You can enter units in several different ways.
Units Palette
You can enter units using the Units palette located in the Palettes pane on the left side of the Canvas. Click the desired
unit (using the Dimensionality drop-down list to switch to different groups of units), or insert the unit placeholder (as
illustrated in Figure 3.2) and overwrite the placeholder.
You may want to place a space between the number and the unit.
Unit function
You can use the Unit() function to assign a unit.
Keyboard shortcut
Press Ctrl + Shift + U to enter a unit placeholder. Then, replace the placeholder with the desired units.
Deleting all the characters in a unit placeholder will leave an empty placeholder one character in size. Deleting this
empty placeholder will remove the unit placeholder entirely.
When the results of your calculations contains units, you can use the units formatting options in the Context Panel to
rescale the units to units you'd prefer to see.
The Digits environment variable controls the number of digits that Maple uses when making calculations with software
floating-point numbers.
The default value of Digits is 10. The value of Digits is changed with the assignment operator (e.g. Digits:=15).
Figure 3.7 illustrates the effect of changing digits from its default value of 10 to 15 on the evaluation of . (Note
that numeric formatting on the result of has been set to Fixed with 20 decimal places.)
13 • Entering Math
Evaluation Order
Maple Flow evaluates calculations from left-to-right, top-to-bottom (much like reading a page from a book). This
means that downstream calculations only "see" assignments on the left or above. This is illustrated in Figure 3.8.
You can change the evaluation order by moving math containers around.
If you want to author content without any math evaluating in the Maple Flow worksheet, but eventually the math will
be executed, you can temporarily disable evaluation.
To disable evaluation:
• Click Turn evaluation off ( ) on the toolbar. An indicator will appear at the top of the canvas indicating Evaluation
Disabled.
To enable evaluation:
• Click the icon again.
4 Creating a Polished Document
4.1 Entering Text
To enter text:
1. Click in a blank part of the canvas.
2. Press Space to create an empty text container. This will have a blue border.
3. Type your text.
4. Use the context toolbar to format your text.
14
15 • Creating a Polished Document
Figure 4.4 shows the result of using background color on the math containers that define two assignments.
By default:
• Text is given the Text style.
• Math input is given the 2D Math style.
• Math output is given the 2D Output style.
You can apply other styles with the other entries (such as the Title style for text). You will need to drag-select the
content of the container and pick the appropriate style.
Use the Format > Styles menu to change the typeface of the pre-defined styles.
To create a section:
1. Select Insert > Section.
If you select some content and then use Insert > Section, the selection will be enclosed in the section.
2. Enter a title for the section. You can modify the font/style for the title.
To change the size of the section, you can drag the bottom boundary line. If you drag the section boundary past addi-
tional content, the section now encloses that content.
To collapse a section:
• Click the collapse button ( ).
To expand a section:
• Click the expand button ( ).
Figure 4.6 shows an example of a Maple Flow worksheet with sections. The first section is collapsed and the second
section is expanded.
17 • Creating a Polished Document
Evaluation order still applies as it normally does, and content in a section is evaluated even if a section is collapsed.
Tip: If a section does not have a title, click on the top boundary line. This opens the title text box for editing.
You can control the display of sections using Format > Section Style. From this dialog, you can
• Control whether to display the top and bottom boundary lines.
• Specify margins.
• Specify boundary line thickness.
• Specify boundary line color.
• Specify boundary opacity.
• Control whether to display the expand button.
Note that if the section style is set up so the expand/collapse button is not displayed, you can expand or collapse a
section by doing one of the following:
• Click the left most part of the top section boundary line
• Double-click anywhere along the top section boundary line.
For information on controlling the display of sections when printing or exporting to PDF, see Printing a Worksheet
with Sections (page 31).
Removing a Section
To remove a section:
• Use Edit > Remove Section. The content remains in the canvas, and the section boundaries are removed.
18 • Creating a Polished Document
In the case of an assignment, you can select either Hide commands or Hide commands and name.
There is an option to display a visual indicator for math containers that have hidden commands. To enable this setting,
select View > Visual Indicators. When Visual Indicators is selected, a math container with hidden commands is drawn
with a gray circle at the top left corner.
To show the command again, right-click and select Show commands from the context menu.
Drawing Tools
To view the drawing tools, select an image in your Maple Flow worksheet. The Context toolbar displays the Drawing
toolbar.
The tools include the following: selection tool, pencil (free style drawing), eraser, text insert, straight line, rectangle,
rounded rectangle, oval, diamond, alignment tool, drawing outline tool, drawing fill tool, and line style tool.
Tip: For the text, line, rectangle, round rectangle, oval, and diamond tools,
19 • Creating a Polished Document
- Click once on the toolbar icon to insert that type of object into the drawing. The tool is activated. For example,
.
- Click twice on the toolbar icon to insert multiple objects of the same type without having to reselect the tool.
The icon is highlighted yellow. For example, . The tool remains activated until you select another toolbar
icon.
Text
2. (Optional) From the menu, select the line style, thickness, and arrow points:
20 • Creating a Polished Document
3. In the canvas, click and drag the mouse. A straight line is drawn.
4. To complete the line, click the mouse twice or press Enter. The drawing feature switches to the Selection tool.
5. You can draw more than one connected line; to complete your drawing, click the mouse twice, press Enter, or bring
the end of the last line back to the start of the first line.
6. To remove the last point drawn, press Esc.
If you have inserted a shape in the canvas, you can draw a line that is automatically attached to that shape.
1. Click the straight line icon.
2. Press and hold the Ctrl key, and, in the canvas, hover your mouse cursor over the existing shape to which you want
to attach the line. The shape is highlighted in green.
3. To draw the line, click and drag the mouse.
4. To complete the line, click the mouse twice or press Enter. The drawing feature switches to the Selection tool.
Resizing Lines
To resize objects drawn with straight lines:
1. Select the line to be resized using the selection tool.
2. With the mouse pointer over a grab box, click and drag the line to increase or decrease its size.
3. Release the mouse button.
When an object is selected, grab boxes and nodes at the vertices are displayed.
21 • Creating a Polished Document
1. Click a node and drag the mouse to the desired point, thereby changing the vertex position.
2. Release the mouse.
You can change the line style, thickness, and arrow points of a line either when it is drawn or afterwards.
1. Select a line using the selection tool.
2. From the menu, select a line style, thickness, or arrow direction and shape.
For example, a straight, thick line will have a solid arrow on the right end after clicking on the menu item displayed
above.
22 • Creating a Polished Document
Color Palette
The last five colors that you select are displayed in the box below the color swatches. If you want to view the RGB
values of a particular color, hover your mouse cursor over a color swatch.
Color Wheel
To select a color:
1. Move the slider beside the color wheel to display a range of colors.
2. To select a color, click a point in the color wheel.
23 • Creating a Polished Document
To select a color, specify the RGB values of the color by moving the sliders. Alternatively, you can use the spinners
to scroll to certain values or type the values directly in the fields. For each RGB value, you can specify a number from
0 to 225.
To select a color:
You can use the selection tool to select a single object or a group of objects. To select a group of objects:
Using the selection tool, click and drag the mouse around the items to be grouped. Release the mouse button. The items
are temporarily grouped.
Apply formatting as desired, for example by using the alignment tools in the Drawing toolbar.
24 • Creating a Polished Document
To temporarily switch to the selection tool (when using another tool), press and hold the Tab key (Command, Mac).
You can move and resize objects. When you release the Tab key, the tool will revert to its previous setting. This allows
you to tweak something you just drew.
2. From the menu, select the solid fill style at the top (next to None).
3. From the same menu, click the left color bar at the bottom, and select a color from the color palette.
2. From the menu, select one of the gradient fill styles, the square icons.
3. From the same menu, click the left and right color bars at the bottom to select a color from the color palette for each
part of the gradient.
25 • Creating a Polished Document
To insert a hyperlink:
1. In a text container, select Insert>Hyperlink. The Hyperlink Properties dialog opens.
2. For the Link Text field, enter the text to be shown.
3. Select the link type.
4. For the Target field, enter the destination. Note that you have to save your document if you want to use a relative
path.
5. Optionally, you can add a hyperlink tooltip.
You can also create a hyperlink by selecting some text and using the Format > Convert > Hyperlink menu item.
To edit the hyperlink properties, right-click the hyperlink and select Hyperlink Properties from the context menu.
You can create a hyperlink to a Maple Flow help page. For example, setting Type to Help Topic and Target to solve
creates a link to the solve help page.
In addition to hyperlinks, your worksheet can contain shortcut components, which are clickable image links. The default
look of a shortcut is shown in Figure 4.11, but you can change the image used. The Application Gallery in Maple Flow
uses shortcuts.
26 • Creating a Polished Document
To insert a shortcut:
1. Click on the canvas.
2. Select Insert > Shortcut. A shortcut component is inserted at the cursor.
3. To edit the shortcut properties, select the shortcut component, and in the Context Panel the shortcut properties are
available.
4. Specify a caption, which appears below the image. Optionally, add a tooltip.
Note: The Name field is used by Maple Flow to identify the component. The caption is what is visible.
5. Specify a link target. You can link to a Maple Flow worksheet or URL. You can also use the Shortcut to open a
blank Maple Flow worksheet,
6. If desired, change the image.
5 Further Tools: Mathematical Functions, Programming,
and Plots
5.1 Mathematical Functions
Maple Functions
Maple Flow is built on top of the Maple programming language. You can use most Maple functions in Maple Flow.
Maple package functions are used in the long form. For example, SignalProcessing:-FFT(). Note: Use of the with()
command to load packages is not supported.
The Maple programming language is described in the Maple online help: http://www.maplesoft.com/support/help.
The assume command is not supported (use assuming instead). Some keywords, such as read and save are not supported.
5.2 Plots
You can create a plot with the Maple language plot command. A simple example is given in Figure 5.1.
27
28 • Further Tools: Mathematical Functions, Programming, and Plots
To view the code editor, click the Code Editor button on the main toolbar, as illustrated in Figure 5.3. Alternatively,
from the Edit menu, select Code.
Note: You can only enter proc definitions in the code editor. That is, your code should be in the form:
FirstProc:=proc(...) ... end proc;
NextProc:=proc(...) ... end proc;
To define the procedure, enclose a sequence of statements between proc(...) and end proc statements, and specify the
parameter name(s) in the parentheses after the proc statement. For example, a simple definition for a procedure that
takes one parameter and returns the square of the parameter is:
The on-screen positioning and size of math, text, plots and images will be reflected in the printed page or exported
PDF.
6.2 Headers/Footers
The Insert > Header Footer menu lets you specify a header and/or footer. This will be seen in the printed page or
exported PDF, but not in the working environment.
29
30 • Printing and Exporting to PDF
The File > Print Preview menu lets you preview the printed page or exported PDF.
31 • Printing and Exporting to PDF
When you select Print or Print Preview, the Section Options for Print and PDF dialog opens. Select one of the following:
• Print/export document with all sections expanded.
• Print/export document keeping sections exactly as shown on-screen.
If you selected the first option, in addition, specify whether to print the section boundary markers.
For more information on controlling the display of sections, see Controlling the Display of Sections (page 17).
7 Keyboard Shortcuts
Table 7.1: Keyboard shortcuts
32
nonexecuting, 13, 14
Index using palettes, 10
entering units, 11
evalf, 9
Symbols evaluation
:=, 10 disable temporarily, 13
=, 9 order of, 13
using =, 9
A evaluation modes
accuracy, 12 numeric and symbolic, 9
assigning
hide commands and name, 18 F
value to a name, 10 flip
to front/back, 7
B format
background color section style, 16, 17
for math container, 14 using style sets, 15
bring functions
to front/back, 7 Maple, 27
C G
canvas, 4 graphing, 27
code editor, 28 grid, 6
command completion, 28
commands H
getting help on, 3 help
complex numbers, 11 on additional Maple commands, 3
context panel, 4, 10 help system, 3
control display of math hide commands, 18
hide commands, 18 Home page, 1
numeric formatting of result, 10 hyperlinks
symbolic or numeric result, 9 inserting, 25
D I
defining procedures, 28 i, 11
definition images
creating, 10 drawing on, 18
Digits inserting, 18
for numerical evaluation, 12 insert
header or footer, 29
E section, 16
editing, 6
editing units, 12 K
entering keyboard shortcuts, 32
math container, 6, 9
text container, 6, 14 L
entering math
linking
basics, 10
to another worksheet, 25
command completion, 10
location
complex numbers, 11
grid cursor, 6
definition, 10
in a text paragraph, 14
33
Index
P
packages
using Maple, 27
palettes, 4, 10
units, 11
PDF
export to, 31
Pi, 9
plotting, 27
printing, 29
programming, 28
R
rounding
specify decimal places, 10
S
scientific formatting, 10
section
expand or collapse, 16
sections, 16
display of, 17
shortcuts
inserting, 25
symbolic evaluation, 9
T
text
formatting, 14
formatting using built-in styles, 15
text container, 14