mmcdara

3728 Reputation

17 Badges

6 years, 32 days

MaplePrimes Activity


These are questions asked by mmcdara

Hi everybody.

I often regret that Maple 18 and further versions (maybe some others before ?) do not represent lengthy and complex outputs by introducing substitution expressions (i.e. %1, %2, ...) as Maple 5 or 8 did.

An exemple can be found in the Maple V release 5 programming Guide (p95, expression %1 = ...)

To be more precise I provide you the output Maple 2015 gives on the same problem treated in "Introduction to Maple, André Heck (1993) Springer Verlag" ; page 86 (no advertising here !).

The problem is about solving a polynomial system in 3 indeterminates.
One of the (set of) solutions is quite complex and looks like (I represent just the beginning of the complete solution) :

{x = %1, y = -1/8*(%1^6 + 15*%1^4 ...) / %1^4 , z = ...}
%1 := RootOf(....)  

From at least Maple 18 this same solution takes this form

{x =  RootOf(....), y = -1/8*( RootOf(....)^6 + 15* RootOf(....)^4 ...) / %1^4 , z = ...}

My question is very simple : Does it exist a way to tell Maple to act as Maple 5/8 did ?

Thanks in advance.


PS1 : I tried things like subs(RootOf(....)=freeze(RootOf(....)), sols) but it is not perfect because I dit this manually, by a copy of RootOf(....) from the output and a paste into the subs(....) input (shame on me !)


PS2 : I use to work in worksheet mode, not document mode, and I would prefer an answer adapted to the worksheet mode.

 

Download Maple2015.mw

Hi everybody, 

 

Could somebody just explain me why commands L[1..5] and L[3..6] below do not seem to return "the same type of thing" ?

 

L := Array(1..10, [$(1..10)]);

L := Array(1..10, {(1) = 1, (2) = 2, (3) = 3, (4) = 4, (5) = 5, (6) = 6, (7) = 7, (8) = 8, (9) = 9, (10) = 10})

(1)

L[1..5];
whattype(%);

Array([1, 2, 3, 4, 5])

 

Array

(2)

L[3..6];
whattype(%);

Array(3 .. 6, {3 = 3, 4 = 4, 5 = 5, 6 = 6}, datatype = anything, storage = rectangular, order = Fortran_order)

 

Array

(3)

 


Thank you for your attention


Download array.mw

Could someone please explain to me why the procedure GraphTheory:-CycleBasis requires that the vertices of a graph be integers for it to work correctly ?
(while the definition of a graph supports other types of vertex names)


restart:
with(GraphTheory):

#------------------------------------------------------- test 1

g1 := Graph({{"a", 1}, {1, 3}, {"a", 3}});
DrawGraph(g1);
CycleBasis(g1);

Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: "a" < 1

#------------------------------------------------------- test 2

g2 := Graph({{a, 1}, {1, 3}, {a, 3}});
CycleBasis(g2);

Error, (in GraphTheory:-CycleBasis) cannot determine if this expression is true or false: a < 1

 

#------------------------------------------------------- test 3

g3 := Graph({{4, 1}, {1, 3}, {4, 3}});
CycleBasis(g3);

[[1, 3, 4]]

 
Knowing this limitation I usually rename to integers the vertices of the graphs, next do some operations, and next go back to the original names.


Thanks for any explanation.

hello everybody, 

Is there some trick to bypass the limiited scope of the semicolon statement operator ?

More specifically, is it possible to force Maple to display (apart from the explicit use of the 'print' command) the results of the commands within two nested loops or within a loop and and a conditional statement ?


From the help page concerning statement operators it seems that it is truly impossible ...

"Note: This rule does not apply to statements enclosed in the body of another statement such as an if statement, loop, procedure, module, use statement, or try statement. In these cases, all enclosed statements must be separated by a semicolon or colon."


While not blocking it is a rather irritating limitation :-)

hello everyone, 

To illustrate my question I will get Bob and Alice 

Suppose Bob and Alice work separately on the same subject and must share some information.
They decide to exchange information among themselves by using .m files (Maple internal format files).

-------------------

1) Bob performs the first serie of calculus which ends by some "result". 
This result is the information Bob must send to Alice for her doing her part of the job.
Bob assigns this result to a variable named MyVar and saves it in a .m file :

.....
MyVar := ... :
save  MyVar   "/.../MyFile.m"

Then Bob indicates to Alice the complete path to MyFile.m ... but forgets to say her the name of the variable he has saved.

-------------------

2) Alice reads the file MyFile.m (read "/.../MyFile.m") .... 
Of course, if Alice knew the name of the variable Bob used in his "save" command, it would be the simplest thing in the World for her to browse the content of the .m file (eval(MyVar) generally works well).

But I assumed it is not the case, so my question :

Can Alice recover the name of the variable and visualize it ? 


Any answer will be greatly appreciated


postscript : it is not the first time I find myself in the situation Alice faces here. Often I have to recover the content of .m files written years ago by people who have changed their core business without having properly documented (like Bob) what these files contain

First 30 31 32 33 Page 32 of 33