Explore
The Explore command gives you a quick and easy way to create interactive applications and demonstrations. Explore builds interactive explorations using a collection of embedded components, which can be used to explore an arbitrary expression or a plot. Explore inserts these automatically constructed components into a new worksheet that can easily be saved and shared.
The Explore command has been re-implemented in Maple 17 to provide enhanced and new functionality. The most important changes are:
The exploration components can now be automatically inserted into an existing worksheet or document
The exploration parameters can now be specified programmatically in the call to the Explore command
Previously assigned variables (including data) can now be referenced in the expressions being explored
The Explore command is now used by the plots:-interactive command, including use by the PlotBuilder
Full details on all the options provided by the command are available on the Explore help page.
Note: To fully interact with the examples provided below, open this help page as a worksheet and then execute the worksheet.
Parameters and initial values
Advanced examples
Interactive plots
Easy App Creation
See Also
The new parameters option of the Explore command allows you to specify which of the unknown names in an expression of plot are the parameters to be explored via sliders. In addition, the initialvalues option allows you to specify the parameter values to be used in the first evaluation.
These two new options give the Explore command more programmatic usefulness. Compare the effects of the following two calls to the command.
In the first example, a pop-up dialog window will appear, suggesting end points for parameters A and B. Click on Explore to accept the suggested values.
Explore⁡plot3d⁡sin⁡A⁢y⁢B⁢x2,x=−1..1,y=−π..π,view=−2..2
A:
B:
The second example allows you to bypass the pop-up dialog altogether:
Exploreplot3dsinA⋅y⋅B⋅x^2, x = −1 .. 1, y = −Pi .. Pi, view = −2 .. 2, parameters = A = 0 .. 10, B = 0. .. 10.0, initialvalues = A = 3, B = 4
Using previously assigned data
The following example illustrates the use of data which has previously been assigned to a name earlier in the session.
data:=0,2,12,1.5,0.8,2.5,1.4,2.6,1.8,1.5,2.2,3.1,2.6,2.4,3.1,2.2,3.5,2.2:
with⁡CurveFitting:
Exploreplots:-display plotdata, Splinedata, v, degree = n, v = 0. .. 3.5, view = −1 .. 4, style = point, line, color = black, blue, symbol = circle, symbolsize = 20, plotSplinedata, v, degree = n, v = −1.0 .. 0., view = −1 .. 4, color = red, plotSplinedata, v, degree = n, v = 3.5 .. 4.5, view = −1 .. 4, color = red, parameters = n = 1 .. 7
n:
Exploring a function call
One powerful way to use the Explore command is to pass it a call to a previously assigned function. The key here is that the procedure must return the kind of object to be visualized, in this case, a plot.
f:=proca local b; b≔a^2; return plotsinb*x,x=−2⋅ Pi..2⋅ Piend proc:
Exploref⁡p,parameters=p=−2.0..2.0
p:
The next subsection illustrates this functionality with a more involved example.
Numerical Ordinary Differential Equations with parameters
Suppose that you have an Initial Value Problem (IVP) with unassigned symbolic parameters. The interactive functionality of dsolve,numeric provides an efficient mechanism for numerically solving the solution at multiple values of the parameters.
You can use the Explore command to interact with such a solution space.
sol ≔ dsolveα⋅diffxt, t = .7⋅yt−xt−sinxt^2, α⋅diffyt, t = .7⋅xt−yt+zt, β⋅diffzt, t = −yt, x0 = 3, y0 = 0, z0 = −3, xt, yt, zt, numeric, 'parameters' = α, β, 'output' = 'listprocedure':
caller:=proca,bsol⁡'parameters'='α'=a,'β'=b;solend proc:
F ≔ proc A, B plots:-odeplotcallerA, B, xt, yt, zt, t = 0 .. 500, 'style' = line, 'numpoints' = 10000, 'labels' = x, y, z, 'axes' = 'box', 'color' = 'COLOR''HUE', 1/10*A end proc:
You can now produce a plot of the solution at parameter values alpha=0.1 and beta=0.2.
F⁡0.1,0.2
You can also explore the family of such plots as the parameter values change. This is accomplished by calling Explore on a function call.
Explore⁡F⁡a,b,'parameters'=a=0.5..2.0,b=1.0..10.0
Exploring an animation
After executing the Explore command below, select the plot with the pointer and run the animation using the top menu. By default, the embedded component will show the animation in continuous loop mode. While the animation is playing, you can move the slider and see a changing instance of the animation.
Note that the animations are created on-the-fly for each new slider value.
Exploreplots:-animateplot,a+sin⁡b⁢x,x=−2⁢π..2⁢π,view=−2⁢π..2⁢π,−5..5,b=−2.0..2.0, parameters=a=−3.0..3.0
a:
Interactive plots produced by the plots:-interactive command now make use of new Explore functionality.
Issuing the following command will produce a pop-up dialog. When the pop-up dialog appears, select Interactive Plot with 1 parameter from the uppermost drop-down menu (combo-box), then click Plot.
The result will now be in terms of Embedded Components in the current worksheet.
plots:-interactive⁡cos⁡w,tan⁡w+z,variables=w,z
z:
Context-sensitive menus
The plots:-interactive functionality can also be accessed in a purely clickable manner, via the context-sensitive menus. Context-sensitive menus are used to apply operations to an expression using only the pointer. The menus are available for both 2-D Math output (following execution) and 2-D Math input (preceding execution).
Execute the first command below, then right-click (Control-click on Macintosh) on the output expression to bring up the associated context-sensitive menu. Select the Plots option from the pop-up menu. Inside the Plots submenu, select the Plot Builder. This should bring up the PlotBuilder window. Select Interactive Plot with 1 parameter in the uppermost drop-menu, then click on the Plot button to finish.
In a Worksheet this should insert another instance of the call to the Explore command and the embedded components. In a Document the embedded components will be displayed but the Explore call which created them will not be immediately visible.
ⅇx−a⁢x3
The Explore command is the quickest and easiest way for you to create apps in Maple. If you simply follow the steps in any of the examples above in your worksheet, you can simply save your worksheet and you will have a working app!
If you would like to clean up your app a bit, here are some more suggestions:
First, keep in mind that when Explore creates the table of embedded components, this is treated like output in Maple. Similar to other commands in Maple, if you change or remove your original Explore command call, the values in the inserted components will also change or be removed.
To retain the inserted embedded components in a more permanent way, you can copy and paste the whole inserted table containing the embedded components. If you copy and paste the whole inserted table elsewhere in the current worksheet then its components will function just as the original does, even if the original Explore command and its own output table is deleted.
If you would like to try this, simply do the following:
1. Go to one of the above examples and highlight the plot and slider. You will need to highlight the whole table, so select an area before the plot and drag your mouse down to an area after the slider component.
2. Right click on the selection and choose Copy.
3. Paste the contents elsewhere in the worksheet, delete the original call to the Explore command and its output.
4. Move any preliminary code that you want hidden into the Startup region of the worksheet.
5. Save your worksheet and you have created a brand new standalone app!
Explore, Dynamic Applications Worksheet
Download Help Document