TechnicalSupport

Technical Support

645 Reputation

13 Badges

15 years, 141 days
Maplesoft
Waterloo, Ontario, Canada

MaplePrimes Activity


These are Posts that have been published by TechnicalSupport

A Flow and Maple user wonders why Maple Flow may evaluate to high-precision, floating point numbers compared to the same commands used in Maple that evaluate to simple, concise answers.

 

 

We suggest the same results can be achieved by toggling the numeric/symbolic evaluation mode toggle in the Flow math container(s)

 

 

primes-flow-evaluation-modes.flow

 

For more information, please see section 3.5 of the Maple Flow User Manual (Numeric and Symbolic Evaluation Modes). 

Maple's fsolve command can quickly solve expressions involving large floats where the (symbolic) solve command can take much longer attempting to solve the equivalent rational expression. For example, consider the following worksheet:

restart;

sys := {a + b^0.2784982189 = c+1, b + c^0.9575068354 = a+2, c + a^0.1576130817 = b+3};

{a+b^.2784982189 = c+1, b+c^.9575068354 = a+2, c+a^.1576130817 = b+3}

(1)

fsolve_start:=time[real]():

fsolve(sys);

{a = 3.561242843, b = 1.994950678, c = 3.773320855}

(2)

fsolve_elapsed_seconds:= time[real]()-fsolve_start;

0.50e-1

(3)

solve_start:=time[real]():

###warning, the following command may crash and/or execute indefinitely###

solve(sys);

solve_elapsed_hours:=(time[real]()-solve_start)/3600;


 

Download solve-fsolve-primes.mw

Ever wonder how to show progress updates from your executing code without printing new lines each time?

One way to do this is to use a TextArea component and the DocumentTools package. The TextArea could be inserted from the Components Palette in Maple, or programmatically like so:

restart;

with(DocumentTools):

with(DocumentTools:-Components):

with(DocumentTools:-Layout):

s := "0": #initial text value

T := TextArea(s, identity = "TextArea0"):
xml := Worksheet(Group(Input(Textfield(T)))):

insertedname:=InsertContent(xml)[1,1]: #find the inserted component name in case changed

for i to 10 do #start the demonstration procedure
   Threads:-Sleep(1);
   SetProperty(insertedname,value,sprintf("%d",i),refresh=true);
end do:

Maplets:-Examples:-Message("Done");


Download text-area-update-progress.mw

Hello MaplePrimes community,

We just created a Frequently Asked Question article that may address some Primes questions about updates to Physics in Maple 2022.2: 

Why does Maple 2022.2 throw an error executing Physics:-Version(latest)?

For searchability, the specific error in question is

Error, (in Physics:-Version) unable to determine the Physics Updates version, could you please report the problem to support [at] maplesoft [dot] com

 

  • Maplesoft will work to improve package updating in future versions of Maple.
  • In Maple 2022.2, the workaround is to install and/or update the Maplesoft Physics Updates using the MapleCloud toolbar.

A user found that the behaviour of calling a command from a library with a long form command name which invoked another command from that library with the short form name was unexpected:

restart;
ScientificConstants:-GetValue(Constant(g))

Error, (in ScientificConstants:-GetValue) `Constant(g)` is not a scientific constant object

 

 

 

We suggested to either

[Edit May 13 after Acer's improvements]

A) import the package such that all short form names of commands from the package are available in the Maple session and use the short form of both commands:

restart;
with(ScientificConstants):
GetValue(Constant(g));

9.80665

(1)

Download scientificConstantsGetValueShortFormsWithPackage.mw

or

B) use long forms for both command names:

restart;
ScientificConstants:-GetValue(ScientificConstants:-Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormLongForm.mw

or

C) to test that a long form command and a short form command work together, import the package for the short form command:

restart;
with(ScientificConstants):
ScientificConstants:-GetValue(Constant(g))

9.80665

(1)

Download scientificConstantsGetValueLongFormWithPackage.mw

Further details can be found in the article ?UsingPackages

1 2 3 4 5 Page 1 of 5