maple_linux

20 Reputation

One Badge

3 years, 270 days

MaplePrimes Activity


These are replies submitted by maple_linux

@Joe Riel thank you very much, I have just seen your reply.
I have tried the procedure maplemint() (and also
mint from the linux command line) and it provides
all the information that I originally requested
plus a lot more.

maplemint() is an extremely useful procedure. I do not know

whether it is presented in detail in the Maple "User Manual"

and "Programming Guide" (it does not seem to be listed in

the Index of the Maple16 versions of these documents).

Thank you once again for this detailed and very useful
suggestion - much appreciated.

@Joe Riel I renamed the utility function that was kindly provided to my_find_vars2()

and applied it to a test procedure test_l() - see below.

The output of my_find_vars2(test_l) is the set of variable names {y1,y2}.

How can my_find_vars2() be modified/re-written in order to return all the variables that are used in a procedure, in this case the set  {y1,y2,x1,z1,z2} ?

By copying and pasting the contents of the set {y1,y2,x1,z1,z2}, all procedure variables can be conveniently declared as local. In more lengthy procedures this can be dozens of variables or even more than a hundred variables in some cases.

test_l := proc()
y1 := sin(x1);
y2 := cos(z1) + z2^2;
end proc:

my_find_vars2 := proc(f :: procedure, $)
  return {op(2, eval(f)), op(6, eval(f))};
end proc:

Page 1 of 1