MaplePrimes Questions

Good Day.

I have attached a worksheet for a time series that comprises 45 data points. I would like to investigate the overall demand (for forecasting purposes) and to isolate the underlying demand components; that is, trend, level, seasonal, and residual. However, I have difficulty in distinguishing each component in the plot as the colors appear to be similar and some may have relatively small values.

Does anyone know how to recolor these components so they appear to be more obvious? It would be also beneficial to isolate and plot each individual component - can that be done?

Thanks for your interest!

MaplePrimes_Time_Series.mw

Anyone know about a Hypergraph package for maple like

HyperNetX in Python

https://pnnl.github.io/HyperNetX/build/overview/index.html

Is their anyway we can use python packages in maple

Hello:

I've changed my laptop this week and I'd like to know how to install Maple with my account in the new one.

Thanks in advance.

Sergio Sanz.

hi everybody, i have a question, i hope u can help me, i want to know how to convert a complex function to conjugate form, for example i want to convert  exp(Ix)  to exp(-Ix) when x is real. conjugate  command dosn't work for me, becuse it assume  that we dont khow x is real or not,when i use assume command befor conjugate,again it does not  solve my problem, in the other hand, evalc command dosn't work too, becuse i want to have exponential form. thanks so much

I have some maple procedures that worked fine for many years. However, I started to notice some important performance deterioration with the new versions (Maple 2021 and 2022). I could identify the "culprit", they are some simplify/sum commands like this one:

A := simplify( sum( sum( sum( sum(sum( sum( sum( sum(
((x-i1)^2+(y-i2)^2)*((x-j1)^2+(y-j2)^2)*((x-k1)^2+(y-k2)^2)*((x-l1)^2+(y-l2)^2) ,i1=1..N)
,j1=1..N),k1=1..N),l1=1..N) ,i2=1..N),j2=1..N),k2=1..N),l2=1..N) );


Using, for instance, Maple 2017, this command requires to complete:

N:=4
memory used=258.2MB, alloc=44.3MB, time=1.58
N:=6
memory used=5247.1MB, alloc=394.0MB, time=39.35
N:=7
memory used=16405.4MB, alloc=775.9MB, time=135.78

On the other hand, in Maple 2022 (similar results for 2021), we have

N:=4
memory used=527.7MB, alloc=44.3MB, time=3.85
N := 6
memory used=10763.4MB, alloc=409.6MB, time=97.22
N := 7
memory used=34564.2MB, alloc=1139.9MB, time=351.94

My laptop (16G RAM) cannot execute N:=8 in Maple 2022 in reasonable time, I guess due to RAM limitation.

Does someone have any hint on how to improve the performance of these commands in Maple newer versions?
 

Mathmatica give the right answer:

I am composing a note using a maple document to demonstrate how the  mathematics from a text (that I find rather dense) can be unfolded into actual calculations using Maple.   My problem is to relate a typeset expression to actual Maple notation that bears no resemblance to the formal expression.

What I would like to do is to convert the typeset notation into a maple name which I can then associate with the calculation written in the functional notation.  For example, the quantity

|A0|2 := leftcontract(reverse(A0),A0);

When I use convert(|A0|2, name);   The result is abs(A[0] ^2 ) which isn’t typeset.

Similarly, the use of single left quotes around the expression as in ` |A0|2 ` it produces an error message when I test the result.  

type( ` |A0|2 ` ,name);
 Error, mismatched or missing bracket/operator

Admittedly, for ordinary calculations, just using any convenient name is more than satisfactory. However, in this case, where I’m trying to link together formal mathematical notation with the Maple operations it implies, being able to link the calculations to a special typeset same would be useful.

Let's say we have a procedure with an optional keyword option and a second procedure is calling this procedure and we want to give the user the option to set the kwarg of the first procedure in the second procedure as well. A simple example (just for the sake of the question, nothing meaningful in this example) is given below. Look at the kwarg "b" in test1. test2 is calling test1 and we want to have the option of setting "b" of test1 in test2 as well. But if I use "b = b" when calling test1, it doesn't work! I thought of using "`b` = b" and even "'b' = b", but they don't work either. One solution is to use a new name, say "c" and calling test1 by "b = c". But that is a bad choice. Because if you call test1 in so many other procedures, then you have to use so many names for one parameter, clearly this is not user friendly too, the user would prefer to remember a parameter by a fixed name. Is there any solution so that I can use the same name here?

test1 := proc( a :: posint, { b :: posint := 1 } ) :: posint:
	return( a + b ):
end proc:
test2 := proc( a :: posint, { b :: posint := 1 } ) :: posint:
	return( a * test1( a, b = b ) ):
end proc:
test3 := proc( a :: posint, { b :: posint := 1 } ) :: posint:
	return( a * test1( a, `b` = b ) ):
end proc:
test4 := proc( a :: posint, { c :: posint := 1 } ) :: posint:
	return( a * test1( a, b = c ) ):
end proc:

What does the & is doing in the following expressions:

1. for m from n by (-2) while n  & gt; 2 do
2.  if errr & gt ; perrr or errrs & gt ; perrrs then
3. if derrr & gt ; 10^(10) then
4. printf(" \134n");

 Help in writing Maple code to transform differential equation with partial derivatives into ordinary differential equation

Hello everyone!

Please help me with this issue.
I have a plot with three curves and when I do any modification to the view (zoom in/out, pan) one of those curves disappears.

This is the plot before the modification of the view:


And this is the plot after the modification: (I just selected the "pan" option and clicked the plot)


What can I do to keep in view all the curves?
Thanks.

SDFS_primer_intento.mw

I use the command line mint  since all my code in .mpl files.

First question:

I noticed mint complains that module name is global, for proc inside the module itself, when the name is used as type of a local variable. But maplemint does not complain. Here is an example

A:=module()
   local B:=module()
         option object;
         export n::integer:=1;
   end module;

   export foo:=proc()
      local a::A:-B;  #mint complains that A is global not declared!
      a:=Object(A:-B);
      a:-n:=2;
   end proc;
end module;

running mint -i 2 A.mpl gives

These names were used as global names but were not declared:  A

But A is the module name where the whole code is sitting inside it?  To fix this, I have to add

A:=module()
   local B:=module()
         option object;
         export n::integer:=1;
   end module;

   export foo:=proc()
      global A;  ###################add this
      local a::A:-B;
      a:=Object(A:-B);
      a:-n:=2;
   end proc;
end module;

And now the message/warning is gone. But the above looks really strange.  maplemint does not complain about global A:

But notice that maplemint gives waring that n is never used but mint do not. Another difference!

Which is right about the global name message?

Second question is: I do not understand the message

     These local variables were assigned a value, but otherwise unused:  B

which both mint and maplemint give,

What does it mean B is not used?? I used it to make object a inside proc foo().

What would one do to get rid of this message?

Final comment:

I find many message come out that are not real problems at all. For example, if I declare local variable and use it in equation, as symbol, mint complains that the variable was not assigned a value. Here is an example

foo:=proc()
   local x,eq;
   eq := x^2;
   return eq;
end proc;

now maplemint(foo) gives

Procedure foo()
  These local variables were used but never assigned a value:  x

I know there are ways to filter out these messages. But I am afraid if I do that, I will filter out a message that indicates a real problem?

According to help   -i 2 shows Display severe and serious errors (default)

if I use -i 1, then these message do not show. What do others use?  Level 1 or 2? If I use level 3, then more strange messages show which I do not understand at all how to remove. Such as

These parameters or local variables are also system defined names:
      thismodule
  These names are special to Maple:
      thismodule

So I stick to level 2 for now. but 90% of the messages I get are not real errors at all.

 I want to do the program to convert equation 6 to equation 8 or 7 to 8.

 

Dear colleagues,

how can i plot streamlines and isothermes and also 3D graphes of Nussult number and skin friction coefficient for boundary layer flow problem with Maple? 

Regards

MAXR

Modified.mw

3D plots of nusselt number like:

Streamline like:

Hello to anyone, 

i am trying to change the valué of x downwards in to the matrix of the next code, but my loop is failing. 
 

n:=5

R:=Matrix(5,n):

for i from 1 to n do 

R[..,i]:=(sin(i*x));

end do:

R;

Untill here all okay, but the next loop is the problem

for i from 1 to 5 do

i:=i

x:=i

R[i,..] := sin(x));

end do:

R;


Thanks for your kind help 

First 16 17 18 19 20 21 22 Last Page 18 of 2176