2210 Reputation

19 Badges

4 years, 267 days

MaplePrimes Activity

These are questions asked by C_R

Here is the layout challenge: Whenever the value of a physical quantity is one as in

mass = 1* Unit('kg')

automatic simplification removes the one and the output displays

Desired would be which reads better (in particular when used inline in text passages).

Using the Empty Symbol

mass = ``(1)*Unit('kg')

an expression with parenthesis is obtained (that can be removed in subsequent calculations with the expand command) which looks worse than my current workaround of using floats

(Introducing floats in expressions is not always acceptable)
So the idea would be to use the empty symbol for initial parameter definition in textbook style layout and remove it with expand in subsequent calculations.

Any other symbol that prints as "1" that can be removed in later calculations by Maple commands is welcome as well. It should be better than

subs(`#mrow(mo("1"));` = 1, %);


Any smarter assumptions or substitutions I could try out on the left handside of the below


If this does not work I would be greatefull for fast numerical evaluation methods. Plotting for example takes to long.

Attached you will find some background on what I want to achieve.


With the following steps

S1: Open Help pressing F1

S2: enter `if in the search field

S3: click a topic in the result list

S4: search within the topic with find/replace (Crtl f) the term `if 

I get plenty of results where I cannot find the search term in the help topic. Why is that?

Is help ignoring the left single quotes ` ?

I don't think so: I get usefull results for `` and `i, which in the later case also lists the topic "ifelse" that contains `if in the textbody.

So, why does advanced searching with the exact phrase "`if" not list the "ifelse" topic?

Realted question:

Why does the search term "(* " not list the relevant help topic help(comment)?

Somehow related in the context of getting more specific results:


To label axes, names with Maple typesetting tags can be used. This is convenient because the typesetting package does not have to be loaded and code is shorter. However, when used together with plot white spaces (mo(“ “)) sometimes do render. Below is an example where a white space after the character N is not rendered.


ta:=Typesetting:-Typeset(`#mrow(mo("N "),mo("* "),msup(mo("mm"),mo("-2")))`)

Typesetting:-mrow(Typesetting:-mo("N "), Typesetting:-mo("* "), Typesetting:-msup(Typesetting:-mo("mm"), Typesetting:-mo("-2")), Typesetting:-msemantics = "atomic")


tb:=`#mrow(mo("N ",color="red"),mo("* "),msup(mo("mm"),mo("-2")))`

`#mrow(mo("N ",color="red"),mo("* "),msup(mo("mm"),mo("-2")))`


tc:=Typesetting:-Typeset(mrow(mo("N "),mo("* "),msup(mo("mm"),mo("-2"))))

Typesetting:-mrow(Typesetting:-mo("N "), Typesetting:-mo("* "), Typesetting:-msup(Typesetting:-mo("mm"), Typesetting:-mo("-2")))





A workarround is adding an addtional tag mspace() or an invisible html character. Are there any others?

Since typesetting of normal Maple output shows the whitespace I am wondering if this way of plotting axis labels is intended. 

Download Typesetting_white_space.mw

For plotting with a plot function that has not been upgraded to units I want to remove units from the following




convert(0.5818576570e-6*exp(-0.1827959741e-5*(x^2+y^2)/Units:-Unit(`μm`)^2)/Units:-Unit(`μm`)^2, unit_free)



map(convert, 0.5818576570e-6*exp(-0.1827959741e-5*(x^2+y^2)/Units:-Unit(`μm`)^2)/Units:-Unit(`μm`)^2, unit_free)




Anything else I could try with convert or something better than this

subs(Unit(1/'`μm`'^2) = 1, %)

I cannot conclude form the help page ?convert,unitfree if it should have worked on the expression.

Is the expression (1) non-scalar?

The term unit-free describes a scalar quantity with no (multiplicative) unit attached to it. Conversion to unit-free does not apply directly to any non-scalar Maple object or data structure, which may still have units embedded within it.

Download convert_unit_free_of_exp.mw

5 6 7 8 9 10 11 Last Page 7 of 28