Pascal4QM

398 Reputation

8 Badges

4 years, 328 days

MaplePrimes Activity


These are questions asked by Pascal4QM

I am writing a very long worksheet, 7 MB at that time. Its size should be further increased. Up-to now, everything is fine. I wonder however if at some point this could be a problem. Has someone experienced trouble with very long file? M2020.1, Windows 10, 64 bits.

Let say the procedure MyProc returns two variables as

A,B:= MyProc(…);

However, for programming purpose, I do not want to create an unused variable. Assuming one only needs B, not A, is there a way not to create and assign A?

For information, in Matlab, it is a commonly used technique. The syntax is

[~,B]= MyProc(…);

In Maple, the meaning of ~ is different, but I am looking for something similar.

 

Taking the example below from the help page, showstat displays the content of a procedure. This is convenient when writing code. However, to perform copy & paste, I would like to get rid of the displayed line number. Is that possible?

f := proc(x) if x <= 2 then print(x); print(x^2) end if; print(-x); x^3 end proc:
showstat(f);

f := proc(x)
   1   if x <= 2 then
   2       print(x);
   3       print(x^2)
       end if;
   4   print(-x);
   5   x^3
end proc

 

Hi,

The VectorCalculus package offers a convenient way to compute multivariate integral over a non-square geometry. See help("VectorCalculus/int"). Here is an example taken from this help page:

 

with(VectorCalculus):

int( x*y, [x,y] = Triangle( <0,0>, <1,0>, <0,1> ) );

 

The question is: is there a way to draw the area “Triangle( <0,0>, <1,0>, <0,1> )” in order to quickly check that it matches the expected region of integration that one needs?

Hi,

From a previous calculation, I got the following nested sum:

Sum(Sum(f[n]*g[q-n]*exp(2*i*Pi*q*x),q = -infinity .. infinity),n = -infinity ..
infinity)

 

However, to keep on the calculus, It is more convenient to have:

Sum(Sum(f[n]*g[q - n]*exp(2*i*Pi*q*x), n = -infinity .. infinity), q = -infinity .. infinity)

 

That is, permute the summation precedence.

Is there a way to automatically transform the first expression into the second one?

1 2 Page 1 of 2