Kitonum

21435 Reputation

26 Badges

17 years, 28 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Markiyan Hirnyk  Perhaps the reason for this in the operating system. I have Windows 8.1

@Markiyan Hirnyk   On my comp in Maple 2016.1  I see:

plot3d(x^2-y^2, x = -1 .. 1, y = -1 .. 1, axes = normal, style = surfacewireframe);

                            

 

 

 

 

@Markiyan Hirnyk  Edges, already passed, are marked in red:

with(GraphTheory):

G := Graph(Trail(1, 2, 3, 4, 5, 6, 4, 7, 8, 2));

L := RandomWalkOnGraph(G, 2, 20);

n := nops(L):

for i to n do

HighlightVertex(G, L[i]);

if i >= 2 then HighlightTrail(G, L[1 .. i]) end if;

M[i] := DrawGraph(G);

G := Graph(Trail(1, 2, 3, 4, 5, 6, 4, 7, 8, 2))

end do:

plots[display](seq(M[i]$10, i = 1 .. n), insequence = true);

          

 

                           

with(GraphTheory):

G := Graph(Trail(1,2,3,4,5,6,4,7,8,2) );

L:=RandomWalkOnGraph(G,2,20);

for i in L do

HighlightVertex(G,i);

M[i]:=DrawGraph(G);

G := Graph(Trail(1,2,3,4,5,6,4,7,8,2) );

od:

plots[display](seq(M[i]$10,i=L), insequence=true);

                     

 

                              

 

 

@Markiyan Hirnyk  Thank you. As for the animation, it is very easy to do, if you use  HighlightVertex  command. But now I have no time to do it, because half an hour begins the final of the European Football League.

@Carl Love   Many thanks for the work done to improve my procedure. Convert your comment to an answer  that I was able to vote for it. It will also be helpful if you added your version as a comment to my post.

@farazhedayati  Unfortunately in the procedure provided that the variables have the names  x  and  y . I replaced the variable  a  with  y . Now it works:

PP := subs(a = y, 0.3800179925e-3*exp(-0.6065722618e-3*(x-29.51704536)^2+(0.6650093594e-3*(x-29.51704536))*(a-12.94061928)-0.1106850312e-2*(a-12.94061928)^2));

ContoursWithLabels(PP, -20 .. 20, -20 .. 20, {seq(0.1e-3 .. 0.3e-3, 0.5e-4)}, [color = black, axes = box], Coloring = [colorstyle = HUE, colorscheme = ["Cyan", "Red"], style = surface]);

 

 

 

@Markiyan Hirnyk  A similar incorrect plotting:

plot(1/x, x=-5..5, y=-5..5, color=red, thickness=4);

@Markiyan Hirnyk  You have incorrectly wrote the first equation (see the original post). Here are the individual plots of the first and second equations. It is clearly seen that the first set (for y<>0) is a subset of the second set. This is a graphic illustration of what I wrote earlier:

a:=sin(165*Pi/180-theta)/10-sin(theta)/y:

b:=(((y^2-20*y*cos(Pi/12)+100)*(sin((165*Pi/180)-theta))^2)/100)-sin(Pi/12)^2:

plots:-implicitplot(a, y=-10..25, theta=0..2*Pi, gridrefine=3, thickness=2):

plots:-implicitplot(b, y=-10..25, theta=0..2*Pi, gridrefine=3, thickness=2):

plots[display](<%% | %>);

         

 

 

 

@spalinowy  I do not understand what your problem. Please download the Maple worksheet in which you received the wrong matrices.

@Joe Riel  Thank you! Unfortunately,  Iterator  package works for me only with  compile=false option. I already wrote about this  here . Maybe you know the reason for this?

@Carl Love  Thank you! In fact, if you remove remember option,  combinat[permute]  works, but 10 times slower than Permute  procedure. See

restart;

P := proc(a, r := nops(a))

local i, k, p, t;

if r = 0 then [[]] else p := NULL;

for i to nops(a) do member(a[i], a, 'k');

if k < i then next end if; t := P(subsop(i = NULL, a), r-1);

p := p, seq([a[i], op(k)], k = t) end do;

[p]; end if;

end proc:

 

L := CodeTools[Usage](P([$1 .. 10])):

 nops(L);

   memory used=5.50GiB, alloc change=0.75GiB, cpu time=3.85m, real time=2.99m, gc time=101.58s

                                                                         3628800

 

Therefore,  remember option is not the only reason for the inefficiency of combinat[permute] command. 

 

@John Fredsted 

for i while i<=5 do

 i;

end do;

@vv  Thank you!  Your version with  compile = false option works wonderfully.

@acer  You wrote "Does the Compiler work at all for you?"  I've explicitly never used  Compiler  and do not know how to answer your question. 

First 78 79 80 81 82 83 84 Last Page 80 of 132