mmcdara

6408 Reputation

17 Badges

8 years, 20 days

MaplePrimes Activity


These are questions asked by mmcdara

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

Hello everybody,

* The following set of instructions returns me an error

restart:
with(Maplets[Examples]):
A := Matrix(2,2,[1,2,3,4]):
LinearAlgebra:-Transpose(A);

Error, Transpose is not a command in the Maplets:-Examples:-LinearAlgebra package

(it would be the same for any other command from the LinearAlgebra package)


* If I try 

restart:
with(Maplets[Examples]):
with(LinearAlgebra):
A := Matrix(2,2,[1,2,3,4]):
Transpose(A);

the answer is Transpose(...),  as if Transpose was an undefined function (no matter the order of the loading of the two packages)


* In Maplets[Examples] there is a subpackage named LinearAlgebra : could it be the reason of these observed behaviour ?
* Is there any way to fix that other than copying from Maplets[Examples] the only pieces of code I need avoiding thus its complete loading ?
* More generally : is it possible to load a package "partly" by discarding some of its subpackages ?

Thank you for your answers

First 41 42 43 Page 43 of 43