Product Tips & Techniques

Tips and Tricks on how to get the most about Maple and MapleSim

Yes, some convertible car seats come with bases, while others don't. The base is typically used for installation in rear-facing mode, providing additional stability and ease of installation. However, when the seat is converted to forward-facing mode, the base is often not needed and may be removed. It's essential to consult the specific instructions provided by the manufacturer of the convertible car seat to ensure proper installation and usage.

This post is to help anyone who is just as frustrated about typesetting in plots
as I was before I solved my problem. (Note: the technique works with the version

2020 and newer and may work with earlier versions.)

 

Why? Because there is no obvious help in Maple showing what works. (And if folks

can improve what I have posted,  please do so. At least when someone executes

a search for this type of problem, they might see the best approach.)

Goal: typeset a name of a function in any text of a plot.

Approach: According to help, '?plot, typesetting',  one should use the
option(procedure?) typeset.   For example:

"restart;   plots:-setoptions(size = [400, 200]):    `f__1`(x) :=cos(x)*(e)^(-(x^(2))/(4)) :    p1 := plot(`f__1`(x), x = -5..5,                         legend = typeset("function ", `f__1`(x) )  );"

 

 

However, what I want in the legend is the expression "`f__1`(x),"not the evaluated

expression. Entering the name with single quotes around the expression leads to this:

 

p1 := plot(f__1(x), x = -5 .. 5, legend = typeset("function ", 'f__1(x)'))

 

 

which is great, except that when I wish to redisplay the plot

 

plots:-display(p1)

 

the expression f__1(x)is evaluated.

 

According to the code completion capability of Maple, the procedure

"Typesetting:-Typeset" exists, and it does not evaluate the function:

 

p1 := plot(f__1(x), x = -5 .. 5, legend = Typesetting:-Typeset(f__1(x))); plots:-display(p1)

 

 

except there is no help regarding this procedure.

 

It appears that the procedure operates only on one item.

 

Solution: Hence, the ultimate solution for my problem is to still use the typeset 

option, but Typeset any expression.

 

p1 := plot(f__1(x), x = -5 .. 5, legend = typeset("function ", Typesetting:-Typeset(f__1(x)))); plots:-display(p1)

 

 

Again, if you can contribute to this post, I would appreciate it.


 

Download MaplePrimies_-_Typesetting_in_plots.mw

Time is running out for users of Mathcad® 15 worksheets.
Engineers who need to retain their historical Mathcad project files are faced with a looming deadline to move the content to another file format.

The good news is that Mathcad 15 users can turn to Maple Flow as an effective replacement design calculation tool. Maple Flow is an advanced calculation tool with a free-form layout that makes it easy for engineers to brainstorm, develop, and document their project designs.

Maplesoft now has an efficient migration solution for moving critical Mathcad content to Maple Flow worksheets. This gives engineers a path to safeguard their critical reference designs, mathematical analyses, and engineering test results.

Why are engineers moving from Mathcad 15?
In 2025, some changes are expected that will severely restrict access to Mathcad 15 software. Here’s some background:

  • PTC announced that Mathcad 15 is end-of-sale effective December 2021, restricting license activations for new users.
  • Those existing Mathcad 15 customers who bought multiyear license extensions will see them expire by December 2025. After that, those with subscription licenses will not be able to open the app, and will not be able to access their historic design documents.
  • One of the significant issues engineers are encountering is that the new version of the software is not directly compatible with their historical Mathcad documents. PTC no longer has the right to distribute software versions with a third-party component, and has opted to use a different symbolic calculation engine in Mathcad Prime® that cannot read and edit the legacy files.
  • Another issue is that the Mathcad 15 software does not support Windows 11, so is typically run on Windows 10, a platform that Microsoft will not be supporting after October 2025.
  • Without a reliable way to keep accessing their project work in the Mathcad 15 format, engineers are looking for an alternative design worksheet platform.

As a result, engineers with large repositories of these design files now face converting all the worksheets to a new format or risk losing access to valuable design reports, and the possible regulatory consequences.

Maple Flow as a replacement for Mathcad 15
Engineers who want a long-term stable environment for their critical project work can change their design workflow to use Maple Flow for everyday calculation tasks.

The advanced math features and formatting options in Maple Flow make it a good fit for creating (and updating) design documentation and hand calculations, where engineers combine mathematical equations and variables that change regularly, and show the results in a report.

Maple Flow has a short learning curve, and the range of example templates in the Application Center and the customized training all help users quickly get up to speed with Maple Flow commands and formatting features.

How can I migrate Mathcad 15 content to Maple Flow?
Maplesoft has created a series of migration strategies for users of Mathcad software to transition to Maple Flow for ongoing calculation needs or to meet compliance requirements.

For engineers with a handful of worksheets, or where the calculations only span a few pages, it is relatively quick to reenter the calculations directly in Maple Flow. Some steps will need to be updated to the equivalent Maple Flow function, and there is also the opportunity to use features that are not available in Mathcad 15 (or its successor Mathcad Prime), such as advanced signal processing tools, thermodynamic data, and functionality for the analysis of linear systems.

For engineering firms with large repositories of legacy Mathcad 15 files, Maplesoft has developed a convenient path to migrate batches of content into Maple Flow. Maplesoft Engineering Services guide customers through the migration process and apply an efficient Migration Assistant to move the equations, variable definitions, units, layout, and other supported features from Mathcad 15 worksheets to Maple Flow. The content is mapped to the equivalent Maple Flow functionality, so that calculations can be run and developed further. This allows project worksheets and templates to be recreated with the least investment in time.

This image shows a calculation section before and after batch migration into Maple Flow format:

Ongoing support from Maplesoft

Maple Flow was first launched in 2021 and was developed to give engineers a single tool that can perform mathematical analysis and present results in a professional-looking format. There is built-in support for natural mathematical notation and tracking units, and the development roadmap continues to follow a user-focused approach, so new usability enhancements are regular and relevant.

The current release of Maple Flow gives engineers a path to avoid losing legacy calculations and designs previously stuck in Mathcad 15 worksheets and reuse the content for ongoing project work.

If you would like assistance from Maplesoft with migrating large repositories of design worksheets, please contact Maplesoft Sales.

[This is a contributed article by Alex Beilby, Technical Marketing Mgr, Maplesoft]

[Right-click on image and open in new tab to see larger]

To Scan Math with the Maple Calculator and show solution steps in Maple:

1. first scan some math with the calculator

2. Maple calculator immediately shows the solution if that is what you are looking for:

3. Calculator gives options to show the solution steps in the calculator itself ( footprint button in top-right) 

4. Or to upload the math to the MapleCloud (cloud icon with up arrow)

5. Once the math is uploaded, MapleCloud can be loaded on a desktop computer and the file opened from your account's Maple Calculator group of files:

6. Again, the solution and some more details are visible on Maple Cloud:

7. To open this math in Maple, click the blue button to Download the file.

The downloaded file can then be loaded in Maple:

8. The Maple commands to solve this math are shown, and the result. 

To show steps in Maple at this point, convert the math to inert form, then run the Student:-Calculus1:-ShowSolution() command on it:

Ex := Int(3.(x^2), x = 0 .. 7)

Int(3*x^2, x = 0 .. 7)

(1)

Integrate

 

The solution to this integral is:

int(3*x^2, x = 0 .. 7)

343

(1.1)

Student:-Calculus1:-ShowSolution(Ex)

"[[,,"Integration Steps"],[,,(&int;)[0]^73 x^2 &DifferentialD;x],["&EmptyVerySmallSquare;",,"1. Apply the" "constant multiple" "rule to the term" &int;3 x^2 &DifferentialD;x],[,"?","Recall the definition of the" "constant multiple" "rule"],[,,&int;[] f(x) &DifferentialD;x=[] (&int;f(x) &DifferentialD;x)],[,"?","This means:"],[,,&int;3 x^2 &DifferentialD;x=3 (&int;x^2 &DifferentialD;x)],[,,"We can rewrite the integral as:"],[,,3 ((&int;)[0]^7x^2 &DifferentialD;x)],["&EmptyVerySmallSquare;",,"2. Apply the" "power" "rule to the term" &int;x^2 &DifferentialD;x],[,"?","Recall the definition of the" "power" "rule, for n" "<>" "-1"],[,,&int;x^[] &DifferentialD;x=[]],[,"?","This means:"],[,,&int;x^2 &DifferentialD;x=[]],[,"?","So,"],[,,&int;x^2 &DifferentialD;x=(x^3)/3],[,"?","Apply limits of definite integral"],[,,[]-([])],[,,"We can rewrite the integral as:"],[,,343]]6""

(2)

Download MapleCalculatorMathCloudUpload.mw

Plots of physical quantities has significantly improved with Maple 2022. The updated useunits option makes unit conversion errors in plots very unlikely. A lot of time is saved when creating plots of physical quantities where values and units must be correct.

One final source of user errors remains: The manual entry of incorrect units in labels.

Below is a way to avoid such errors by computing labels with units for three prevalent axis labeling schemes.


Other desireable labels are given as a suggestion for future plot label enhancements where plot commands could provide formating functionality.

The rendering on this website adds double brakets ⟦ ⟧ wherever units are used. You have to open the document to see how Maple renders.

NULL

Simple plot example: Solar irradiance in space

G__0 := 1361*Unit('W'/'m'^2)

1361*Units:-Unit(W/m^2)

(1)

G__0*sin(2*Pi*t/(24*Unit('h')))

1361*Units:-Unit(W/m^2)*sin((1/12)*Pi*t/Units:-Unit(h))

(2)

plot(1361*Units:-Unit(W/m^2)*sin((1/12)*Pi*t/Units:-Unit(h)), t = 0 .. 12*Unit('h'))

 

This plot has inconsistent axis labeling:

• 

The vertical axis has units but no name

• 

The horizontal axis has a name and units but they are not easily distinguishable. Misinterpretation is possible. Due to the close spacing the label could be read as a product of the dimension "time squared" (the time t times hours h is of the dimension time squared). Or the reader confounds name and units. (The use of italic fonts for names and roman fonts for units might not be noticeable and is a convention that is not used everywhere.)

 

The above labeling should be improved for communication, documentation or publication purposes.

 

A quick attempt using strings and the options useuints and labels.

plot(1361*Units:-Unit(W/m^2)*sin((1/12)*Pi*t/Units:-Unit(h)), t = 0 .. 12*Unit('h'), useunits = ['d', kW/m^2], labels = ["Time t in days", "Exposure G in kV/m^2"])

 

Axes are now consistent and can be interpreted unambiguously. Formatting can still be improved.

 

Unfortunately, using the options useunits (for unit conversion) and labels this way introduces a new source of user error when labels are entered with the wrong units.

 

A way to address this and to ensure unit error-free plotting of expressions of physical quantities is the following:

 

Step1: Define two lists, one for the units to display and the other for the names to display

a := [Unit('s'), Unit('W'/'cm'^2)]; b := [t, G]

[t, G]

(3)

Step2: Compute labels from the lists

This step avoids the labeling error: No manual entry of units in labels required.

c := [b[1]/a[1], typeset(b[2]/a[2])]; d := [typeset(b[1], "  ", "&lobrk;", a[1], "&robrk;"), typeset(b[2], "  &lobrk;", a[2], "&robrk;")]; e := [typeset(b[1], "  ", "(", a[1], ")"), typeset(b[2], "  (", a[2], ")")]

[typeset(t, "  ", "(", Units:-Unit(s), ")"), typeset(G, "  (", Units:-Unit(W/cm^2), ")")]

(4)

NULL

 

Dimensionless labels

 Double brackets

Parenthesis

plot(1361*Units:-Unit(W/m^2)*sin((1/12)*Pi*t/Units:-Unit(h)), t = 0 .. 12*Unit('h'), useunits = a, labels = c)

 

plot(1361*Units:-Unit(W/m^2)*sin((1/12)*Pi*t/Units:-Unit(h)), t = 0 .. 12*Unit('h'), useunits = a, labels = d)