sand15

765 Reputation

11 Badges

10 years, 215 days

MaplePrimes Activity


These are questions asked by sand15

Hi everybody,

My worksheet begins with these two instructions (this is a notional example)
Digits := 25:
interface(displayprecision = 5):

Then the instruction  evalf(1/3+x/6)  returns  0.33333+0.16667x … which is what I had expected.

I now  want to do a formatted print of  evalf(1/3+x/6)  in some file.
Unfortunately the command  

 fprintf(fd, "%a\n", evalf(1/3+x/6)) 

generates a print with the full digits precision (0.333…..33 with 25 "3" for instance).

How could I force fprintf to print the floating point numbers with the number of digits set by interface(displayprecision = 5) ?
 
(PS : for now I have written some kind of “white elephant” stuff which works well only for very simple algebraic expressions)

Any suggestion or answer will be greatly appreciated

 


 

Hi everybody,

I face the following problem :
I develop a Maple simulation code with its own maplets-based interface, and I would like to draw up an "execution report" that presents many informations in a smart and synthetic way :

  1. a summary of the data the user provided through the interface (numerical values, files, ...)
  2. the results of some preliminary operations (ie. the construction of the equations to solve)
  3. some plots of the numerical solution (typically of an ode system)

This execution report should mix texts, plots, charts, ...
At least, I would like the report to be written in LaTeX.

I use to use the software R which provides some facilities to build reports of this kind  (packages knitr or Sweave for those who would know) , and I am wondering if there exists something comparable in Maple ?
Could the DocumentTools package (I know by name only) help me ?
 
More generally, if you were faced with such a problem, how would you deal with it?

As always any suggestion or advice will be greatly appreciated

Thanks in advance

Hi everybody,

I have to solve a system  of 3 equations in 3 unknowns.
One equation is linear while the others are not because of some  sinh(cste*unknown) term.
More of this the unknowns must verify some constraints of inequality type (but always very simple ; for instance “unknown <= value”).

solve fails because of the sinh terms
fsolve fails due to the inequalities


What Maple procedure do you advise me to use to solve this system ?
(at this stage I think advices could be sufficient ; if I keep coming up against the problem I will submit you a more detailed question)


Thanks in advance

 

Hi everybody,

 

Here is a very simple question :
I have two strictly positive reals r and s and the expression
a := r^2 – r*s + s^2
Obviously a is strictly positive too

But I’m not capable to prove this with Maple (2016, Windows 7), even after having declared r and s both positive which, I thought, would have prevent Maple to consider them as potentially complex.
I failed in using "is", "coulditbe", "use RealDomain ..." and so on

Totally distressed I tried to do something simpler ... which ultimately appeared still more upsetting

restart:
assume(r, ‘positive’):
coulditbe(r, ‘complex’) ;    # the answer is (surprising ?) true

I'm probably doing some mistake bigger than I but I don't find it !

Could you be compassionate enough to enlight me !!!

Mammoth thanks in advance

Hi,

This question concerns the package GraphTheory
( Maple 2015 on a Windows 7 PC )

Let G1 be some graph and V a list of vertices in G1
The default colors DrawGraph uses for the vertices is yellow

I define the graph G2 this way :
    G2 := copy(G1):
    HighlightVertex(G2, V, red);
    DrawGraph(G2);
Obviously the result is a graph where vertices in V are red while the remaining ones are still yellow

Question 1 :  Why does the command DrawGraph(G1) returns exactly the same picture ?
I have thought that defining G2 as a copy of G1 would have preserved the default colouring of the vertices.
Note that the same undesired (at least for me) thing occurs with the  HighlightEdges command.

Question 2 : Is it possible to retrieve the original colouring of G1 without using HighlightVertex(G1, V, yellow)  ?

Thank you in advance

First 14 15 16 17 18 19 20 Page 16 of 21