MaplePrimes Questions

Hello

Unfortunately I run out of ideas on how to solve the problem of searching and removing elements in a variable size list.  Below you can find an example.

parms:=[seq(seq(alpha[i,j],j=0..9),i=1..3)];
abc:=combinat:-choose(parms,3):

the condition to remove the element of the list is given by the following procedure.

conds:= proc(varCoef::list,vars::name:=alpha)
local T1,T2,res;
#
T1 := table([2=3,3=2,5=6,6=5,7=9,9=7]):
T2 := table([2=3,3=2]):
#
res:=map(u->vars[`if`(assigned(T2[op(1,u)]),T2[op(1,u)],op(1,u)),
         `if`(assigned(T1[op(2,u)]),T1[op(2,u)],op(2,u))],
    varCoef);
res:=convert(convert(res,set),list):
end proc:

Something like

member(conds(abc[1]),abc,'k')

if it is a member, the element indexed by k should be removed from abc and then the search continues using the next element in abc (that now has one less element).   Otherwise, the element is kept and the search moves to next one.  The process ends when the last element in a short version of abc is tested.

Thanks all for the help and patience.

 

Ed

 

 

Dear experts

I am interested to solve the following equation numerically by Maple. I would appreciate it if you let me how I can do and what the boundary conditions and initial values are needed


eq:= diff(2*diff(eta(x,y,t),t)+3*eta(x,y,t)*diff(eta(x,y,t),x)+(1/3-1/epsilon/B)*diff(eta(x,y,t),x,x,x),x)+diff(eta(x,y,t),y,y)-1/sqrt(Pi*R)*int(diff(eta(x+zeta,y,t),x,x)/sqrt(zeta),zeta=0..t/epsilon)=0;
where

1) epsilon, B and r are constant

2) 1/epsilon/B is not equal to 1/3 at all

choosing lightmodel=none and shading=none, produces a dark grey grided surface
plot3d(x*y, x = 0 .. 10, y = 0 .. 10, lightmodel = none, shading = none)

adding the style=wireframe option gives a blank plot.  Grid probably white?  Changing style to patchnogrid the surface is indeed white. However chosing both shading and style options to none regardless of the lightmodel will produce a plot that appears empty.  Is this to be expected?

However, just the style=wireframe option produces a colored grided wireframe as to expect
plot3d(x*y, x = 0 .. 10, y = 0 .. 10, lightmodel = none, style = wireframe)

Dear users

All my recent questions are removed by "mapleprimes" automatically. who knows the reason?

Hello,

 

I am having problems with Maple. I am new to the software and I am looking to use it for tensors. I am working with the Alcubierre metric, for more details, click the images below.

https://i.imgur.com/OvBywO6.png

https://i.imgur.com/2D9Y73x.png

These images should provide more clarity with the metric. My problem is that in Maple, I have successfully entered the metric, however whenever I use for example the Christoffel command, it states that all the Christoffel symbols are equal to zero.

https://i.imgur.com/VRDQM8d.png

I believe the reason why this is happening is because I have not defined the functions properly. I should be getting an answer like the example in the last picture below.

https://i.imgur.com/tn8HpIE.png

Would anyone be able to assist me in this? I would appreciate it greatly.

 

Many thanks.

Each term of the following sequence is derived using the sum of all preceding terms following a simple algorithm. I have tried to code it but without success (keep getting error message "too many levels of recursion"). 

Definition is as follows:

a(0)=0, a(1)=1;  for n>=1,

a(n+2) = n + Sum{k=1..n+1} a(k). 
 

it starts: 0,1,2,5,11,23,47,95,191,767,1536,3071,6143...

(Looks like every prime term is of the form 3*2^m-1). 

Cann anyone suggest a solution?

Thanks,

David.

Hi,

While computing a simple sequence of numbers, I remarked a small difference between the result obtained with $ and with seq.

Digits:=20:
u:=proc(n) evalf(((n+1)/n)^(n+1)) end proc:
a:=[u(n)$n=1..10]:
b:=[seq(u(n),n=1..10)]:
a-b;

 

The result is:

 

[0., 0., -4.*10^(-19), 0., 0., 6.*10^(-19), -9.*10^(-19), 0., -3.*10^(-19), 0.]

I have no idea why there are nonzero values in the output. Does anyone have an explanation?

 

It seems I get the correct values if I quote the expression before $:

a:=['u(n)'$n=1..10]:

However, it's not clear to me why this makes a difference in evalf.

As the title says, I'd like to  divide Non-isomorphism  graphs of order 7   into 6 parts according  diameter of graph.

I write following codes:

restart:
with(GraphTheory):
for i from 1 to 7 do
D||i:=[]:
od:

prc:=NonIsomorphicGraphs(7,output=iterator,outputform=graph,restrictto = connected ):
graphmark := prc():                      
while graphmark <> FAIL  do               
    if Diameter(graphmark) = 1 then  
         D1:=[op(D1),graphmark]; 
      elif Diameter(graphmark) = 2 then
         D2:=[op(D2),graphmark];
      elif Diameter(graphmark) = 3 then
         D3:=[op(D3),graphmark];
      elif Diameter(graphmark) = 4 then
         D4:=[op(D4),graphmark];
      elif Diameter(graphmark) = 5 then
         D5:=[op(D5),graphmark];
      elif Diameter(graphmark) = 6 then
         D6:=[op(D6),graphmark];
      fi:                                
     graphmark:=prc():                 
end do:

But I think  conditional statements  if.. elif are used to many  in  above maple  codes,  it is not concise.  

How to write better?

 

 

Projection will not work with orientation. 

plot3d(x*y, x = 0 .. 10, y = 0 .. 10, projection = 0.2)
                                                        

plot3d(x*y, x = 0 .. 10, y = 0 .. 10, projection = 0.2, orientation = [55, 75, 0])
                                                

After setting:

Digits:=20;

result of:

evalhf(9.3653976306373904636884810627704*10^(-315));

is:

-9.0813464423699167205*10^(-315)

 

This looks nonsesnse. What is going on?

 

 

 

how to show which region of the plan belongs to the argument points between 0 and Pi/2 and the module points between 0 and 2 ?

Does anyone know how to open .mm file in Maple, as well as using the program or function in .mm file in Maple? Many thanks.

Hello colleagues,

I would like to get a suggestion on how to utilize an existing `simplify` function or to define an operator, which allows the following simplification:

O(x^n)/x = O(x^(n - 1))

— Alexander

Hello

I need to test a huge amount of subsets and for doing that I was thinking of using combinat:-subset, since it avoids allocating memory for all subsets.  The problem with subset for my specific application is that it generates sets with all possible sizes and I just need subsets with a chosen number of elements.  Can that be done in maple?  

Many thanks

Ed

 

I have a plot of points in a graphical plot on the domain (x,y).  At each point xi (i=1..N) , there is a numerical value yi = S(xi) from which I plot a series of points (xi, S(xi)) in the (x,y) domain.     

Each point (xi,yi) represents a transient plot of two variables u(x,t) and v(x,t) in a plot file.  Is it possible to define a graph of the points (xi, S(xi)), such that clicking on any such point in the graph opens up a graphical file which is parameterised by (xi, S(xi))?

Would welcome help on this...

Melvin

First 569 570 571 572 573 574 575 Last Page 571 of 2434