270 Reputation

13 Badges

12 years, 63 days

MaplePrimes Activity

These are questions asked by Andriy


Is there any way to program a button component to stop current calculations and restart maple server?
Thank you.



u := proc (x) options operator, arrow; int(exp(-(x-xi)^2)*f(xi), xi = -infinity .. infinity, numeric) end proc; f := proc (x) options operator, arrow; 1/(1+x^2) end proc; u(4.0); plot(u(x), x = -10 .. 10)





Is there a way to speed up the calculations?
Thank you.



I have two problems:

1) Start code SetProperty(Button0, enabled, true); doesn't switch the property 'Enabled' of Button0 to 'true', as I'd like it to. How to correct the code to switch?

2) I'd like the property 'Enabled' of button 'Button1' switch to 'false' immediately after it is pressed. (I put SetProperty(Button1, enabled, false); at the beginning of Action When Clicked) However Maple waits untill all code within Action When Clicked is calculated. How to correct it?


I want to show an animation in Plot component on Button press.

Action when clicked for the button :

use DocumentTools in

Do(%Plot0 = dis);
SetProperty(Plot0, play, true, refresh=true);

end use;

Variable dis was calculated earlier:

B := animate(plot, [u(t, x), x = xmin .. xmax], t = tmin .. tmax, frames = n):
dis:=display(B, insequence = true):

However, the first press on the button gives static first frame. Only second press starts the animation.
What's the problem with my code?

Maple can plot a function that is a convolution of Dirac delta-function and some regular function.


with(plots); a := 1.0

f := proc (x) options operator, arrow; exp(-abs(x)) end proc
G := proc (x, xi, t) options operator, arrow; `if`(t = 0, Dirac(x-xi), (1/2)*exp(-(1/4)*(x-xi)^2/(a^2*t))/sqrt(Pi*a^2*t)) end proc

u := proc (t, x) options operator, arrow; int(G(x, xi, t)*f(xi), xi = -infinity .. infinity) end proc; plot(u(0., x), x = -3*Pi .. 3*Pi)



proc (x) options operator, arrow; exp(-abs(x)) end proc


proc (t, x) options operator, arrow; int(G(x, xi, t)*f(xi), xi = -infinity .. infinity) end proc



Hovewer, it is unable animate this function (the first frame is empty).

n := 10:



Is it a bug? Is there a nice workarround of this bug?


3 4 5 6 7 8 Page 5 of 8